summaryrefslogtreecommitdiffstats
path: root/examples/widgets/doc/src/tooltips.qdoc
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2024-01-22 22:31:51 +0200
committerTarja Sundqvist <tarja.sundqvist@qt.io>2024-01-22 22:31:51 +0200
commit67934c103800bae50c2ec1977758d40fa8e4e507 (patch)
tree77a44eb54a75a35bd10f3c63be588889b697e451 /examples/widgets/doc/src/tooltips.qdoc
parent694575a59b5370afc494fbf700eee8db1d1ec091 (diff)
parentca128e25119c0b259d083567c796bfa67b100a42 (diff)
Merge remote-tracking branch 'origin/tqtc/lts-6.2.8' into tqtc/lts-6.2-opensource
Conflicts solved in a file: src/corelib/io/qstandardpaths_android.cpp Change-Id: Ie8cef36c1379679ca358df50c56b3c25aa15c5d6
Diffstat (limited to 'examples/widgets/doc/src/tooltips.qdoc')
-rw-r--r--examples/widgets/doc/src/tooltips.qdoc16
1 files changed, 10 insertions, 6 deletions
diff --git a/examples/widgets/doc/src/tooltips.qdoc b/examples/widgets/doc/src/tooltips.qdoc
index a278215503..da3f1bd489 100644
--- a/examples/widgets/doc/src/tooltips.qdoc
+++ b/examples/widgets/doc/src/tooltips.qdoc
@@ -148,6 +148,10 @@
private \c createShapeItem(), \c initialItemPosition() and \c
initialItemColor() functions.
+ \snippet widgets/tooltips/sortingbox.cpp 27
+
+ In the destructor, we delete all shape items.
+
\snippet widgets/tooltips/sortingbox.cpp 5
QWidget::event() is the main event handler and receives all the
@@ -223,8 +227,9 @@
If an item covers the position, we store a pointer to that item
and the event's position. If several of the shape items cover the
position, we store the pointer to the uppermost item. Finally, we
- move the shape item to the end of the list, and make a call to the
- QWidget::update() function to make the item appear on top.
+ move the shape item's pointer to the end of the list, and make
+ a call to the QWidget::update() function to make the item appear
+ on top.
The QWidget::update() function does not cause an immediate
repaint; instead it schedules a paint event for processing when Qt
@@ -314,10 +319,9 @@
The \c createShapeItem() function creates a single shape item. It
sets the path, tooltip, position and color, using the item's own
- functions. In the end, the function appends the new item to the
- list of shape items, and calls the QWidget::update() function to
- make it appear with the other items within the \c SortingBox
- widget.
+ functions. In the end, the function appends the new item's pointer
+ to the list of shape items, and calls QWidget::update() to make
+ it appear with the other items within the \c SortingBox widget.
\snippet widgets/tooltips/sortingbox.cpp 22