From fa804e7d7e20d69656f061c5a81c6e6223e4ea29 Mon Sep 17 00:00:00 2001 From: Sergio Pulgarin Date: Sat, 7 Nov 2026 20:09:21 -0500 Subject: [PATCH] Smooth-scale video in the QGraphicsScene camera backend QGraphicsVideoItem draws each frame with QPainter::drawImage(), scaled to the widget size. QGraphicsView leaves SmoothPixmapTransform off by default, so the downscale was nearest-neighbor and edges shimmered ("squiggled") whenever the picture moved. This backend is the default on Linux and macOS. Windows defaults to the QQuickWidget backend, which scales on the GPU and is not affected. --- .../CommonFramework/VideoPipeline/Backends/CameraWidgetQt6.5.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SerialPrograms/Source/CommonFramework/VideoPipeline/Backends/CameraWidgetQt6.5.h b/SerialPrograms/Source/CommonFramework/VideoPipeline/Backends/CameraWidgetQt6.5.h index 163f3d7be0..ab3ab10a12 100644 --- a/SerialPrograms/Source/CommonFramework/VideoPipeline/Backends/CameraWidgetQt6.5.h +++ b/SerialPrograms/Source/CommonFramework/VideoPipeline/Backends/CameraWidgetQt6.5.h @@ -65,6 +65,9 @@ class StaticQGraphicsView : public QGraphicsView{ setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setFocusPolicy(Qt::FocusPolicy::NoFocus); + // Frames are drawn by QPainter::drawImage() scaled to the widget size. + // Without this, the scaling is nearest-neighbor and edges shimmer. + setRenderHint(QPainter::SmoothPixmapTransform); } virtual void wheelEvent(QWheelEvent* e) override{