summaryrefslogtreecommitdiffstats
path: root/src/gui/doc/snippets/code
diff options
context:
space:
mode:
authorSamuel Gaist <samuel.gaist@idiap.ch>2019-05-21 22:02:56 +0200
committerSamuel Gaist <samuel.gaist@idiap.ch>2019-05-23 08:39:47 +0200
commit1dc1a032a84d1cc408623ba5b77a0acf50a58eea (patch)
tree0aeee0f938ddbd4ebd44ccee6e44985fa482f223 /src/gui/doc/snippets/code
parentda23302e4d5d6bbdbbf2eaa5eb218a54e91fafeb (diff)
doc: Improve the Coordinate System rectangle coordinate examples
QRect and QLine share a constructor with the same signature but with different meanings. This patch improves the coordinate examples to show the possibilities and make things clearer. Change-Id: I76a95ca226c12968ae5b15d4eb12fc2965cb57d2 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Diffstat (limited to 'src/gui/doc/snippets/code')
-rw-r--r--src/gui/doc/snippets/code/doc_src_coordsys.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/doc/snippets/code/doc_src_coordsys.cpp b/src/gui/doc/snippets/code/doc_src_coordsys.cpp
index 7c53d9e731..147c146b44 100644
--- a/src/gui/doc/snippets/code/doc_src_coordsys.cpp
+++ b/src/gui/doc/snippets/code/doc_src_coordsys.cpp
@@ -52,6 +52,7 @@
QPainter painter(this);
painter.setPen(Qt::darkGreen);
+// Using the (x y w h) overload
painter.drawRect(1, 2, 6, 4);
//! [0]
@@ -69,6 +70,7 @@ QPainter painter(this);
painter.setRenderHint(
QPainter::Antialiasing);
painter.setPen(Qt::darkGreen);
+// Using the (x y w h) overload
painter.drawRect(1, 2, 6, 4);
//! [2]