diff options
author | David Boddie <[email protected]> | 2025-05-23 17:09:17 +0200 |
---|---|---|
committer | David Boddie <[email protected]> | 2025-05-31 06:41:36 +0000 |
commit | 475c951d69a326e7aed0f18f525a155dd95a6a6b (patch) | |
tree | 3391b8fd37e78c6e516e8fda0d9ddce987f74f90 | |
parent | 6854ea63365ae419a04a470eb17e5f7662f00931 (diff) |
Change-Id: Id4456eef3440734add2d804d186966e253335b7c
Reviewed-by: Richard Moe Gustavsen <[email protected]>
-rw-r--r-- | examples/widgets/doc/src/basicdrawing.qdoc | 2 | ||||
-rw-r--r-- | src/widgets/graphicsview/qgraphicsview.cpp | 2 | ||||
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 3 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 4 |
4 files changed, 5 insertions, 6 deletions
diff --git a/examples/widgets/doc/src/basicdrawing.qdoc b/examples/widgets/doc/src/basicdrawing.qdoc index a4606a29814..bbdd19ff22c 100644 --- a/examples/widgets/doc/src/basicdrawing.qdoc +++ b/examples/widgets/doc/src/basicdrawing.qdoc @@ -171,7 +171,7 @@ The QComboBox::itemData() function returns the data as a QVariant, so we need to cast the data to \c RenderArea::Shape. If there is no data for the given role, the function returns - QVariant::Invalid. + QMetaType::UnknownType. In the end we call the \c RenderArea::setShape() slot to update the \c RenderArea widget. diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp index 35445c66bf3..54065e8e580 100644 --- a/src/widgets/graphicsview/qgraphicsview.cpp +++ b/src/widgets/graphicsview/qgraphicsview.cpp @@ -2214,7 +2214,7 @@ QList<QGraphicsItem *> QGraphicsView::items() const This function is most commonly called from within mouse event handlers in a subclass in QGraphicsView. \a pos is in untransformed viewport - coordinates, just like QMouseEvent::pos(). + coordinates, just like QMouseEvent::position(). \snippet code/src_gui_graphicsview_qgraphicsview.cpp 5 diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index c01ae29c680..0b6e0cd8f70 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -238,8 +238,7 @@ void QApplicationPrivate::createEventDispatcher() palette(), setPalette(), font(), - setFont(), - fontMetrics(). + setFont(). \row \li Event handling diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 0a3416a31af..e2a505f6e2a 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -9496,14 +9496,14 @@ void QWidget::changeEvent(QEvent * event) tracking is switched on, mouse move events occur even if no mouse button is pressed. - QMouseEvent::pos() reports the position of the mouse cursor, + QMouseEvent::position() reports the position of the mouse cursor, relative to this widget. For press and release events, the position is usually the same as the position of the last mouse move event, but it might be different if the user's hand shakes. This is a feature of the underlying window system, not Qt. If you want to show a tooltip immediately, while the mouse is - moving (e.g., to get the mouse coordinates with QMouseEvent::pos() + moving (e.g., to get the mouse coordinates with QMouseEvent::position() and show them as a tooltip), you must first enable mouse tracking as described above. Then, to ensure that the tooltip is updated immediately, you must call QToolTip::showText() instead of |