diff options
Diffstat (limited to 'examples/widgets/doc/src/tooltips.qdoc')
-rw-r--r-- | examples/widgets/doc/src/tooltips.qdoc | 16 |
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 |