From 229705622167bc5982c4c243014bf86b37f3c38c Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Mon, 29 May 2023 12:13:43 +0200 Subject: [PATCH] QPainter: Fix missing variable in drawPixmap snippet Fixes: QTCREATORBUG-29216 Pick-to: 6.5 Change-Id: If055e7b4d6ba7734bc29da29db68b3224fc734c1 Reviewed-by: Paul Wicking --- src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp b/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp index 97e5da1960..6f52930f73 100644 --- a/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp +++ b/src/gui/doc/snippets/code/src_gui_painting_qpainter.cpp @@ -114,7 +114,7 @@ painter.drawPath(path); //! [6] QLineF line(10.0, 80.0, 90.0, 20.0); -QPainter(this); +QPainter painter(this); painter.drawLine(line); //! [6] } // MyWidget::wrapper1() @@ -251,7 +251,7 @@ QRectF target(10.0, 20.0, 80.0, 60.0); QRectF source(0.0, 0.0, 70.0, 40.0); QPixmap pixmap(":myPixmap.png"); -QPainter(this); +QPainter painter(this); painter.drawPixmap(target, pixmap, source); //! [16]