From e6249131ff415f7ff899b47f1dc6095da0dcdf25 Mon Sep 17 00:00:00 2001 From: Gitea Date: Tue, 17 Sep 2019 19:48:44 +0200 Subject: [PATCH] Workaround updating frame (and thus darkening the image) by only updating when there is new data. This essentially limits the frame rate to the buffer update rate This will be fixed when painting is done in smaller chunks of the buffer --- osciwidget.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osciwidget.cpp b/osciwidget.cpp index 6e00692..91d1b1d 100644 --- a/osciwidget.cpp +++ b/osciwidget.cpp @@ -62,6 +62,9 @@ void OsciWidget::paintEvent(QPaintEvent *event) void OsciWidget::updateFrameBuffer() { + // Workaround for flickering (do not update, when there is no new data) + if(m_buffer.empty()) return; + if (m_pixmap.size() != size()) m_pixmap = QPixmap(size());