qt6-bb10/src/widgets/graphicsview
Thorbjørn Lindeijer d99b0cfed2 Increase precision for QGraphicsView::AnchorUnderMouse
* Use a more precise view center for views with odd width/height
* Use the QPointF version of mapToScene to avoid rounding
* Round instead of truncate when setting scroll bar values

These changes increase the precision of AnchorUnderMouse, which is
important when for example wheel scrolling is used to change the scale
of the view. Without these changes, the view shifts slightly with each
change in the transform.

[ChangeLog][QtWidgets][QGraphicsView] Increase precision for QGraphicsView::AnchorUnderMouse and QGraphicsView::centerOn

Pick-to: 6.6 6.7
Task-number: QTBUG-96879
Change-Id: I8199196c671e4aa96732f382e8057468f676b8d7
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2024-01-22 14:18:09 +01:00
..
qgraph_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicsanchorlayout.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicsanchorlayout.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicsanchorlayout_p.cpp Fix warning for 32bit builds 2023-11-01 15:58:47 +08:00
qgraphicsanchorlayout_p.h QGraphicsAnchorLayout: remove a redundant member container 2023-10-18 03:05:55 +03:00
qgraphicsgridlayout.cpp Layouts docs: pass parent widget in the ctor 2022-10-21 00:57:24 +02:00
qgraphicsgridlayout.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicsgridlayoutengine.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicsgridlayoutengine_p.h Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qgraphicsitem.cpp Doc: Fix \fn template arguments for Qt Widgets 2023-11-18 13:02:13 +01:00
qgraphicsitem.h QGraphicsItem: remove QtDeclarative 1 vestiges 2023-01-18 15:30:24 +01:00
qgraphicsitem_p.h QGraphicsView: remove even more vestiges of QtDeclarative1 2023-01-18 15:30:24 +01:00
qgraphicsitemanimation.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicsitemanimation.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicslayout.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicslayout.h Replace usages of Q_CLANG_QDOC with Q_QDOC 2022-10-21 09:48:36 +02:00
qgraphicslayout_p.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicslayout_p.h Widgets: pass widget to QStyle::pixelMetric() 2024-01-16 00:01:43 +01:00
qgraphicslayoutitem.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicslayoutitem.h Replace usages of Q_CLANG_QDOC with Q_QDOC 2022-10-21 09:48:36 +02:00
qgraphicslayoutitem_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicslayoutstyleinfo.cpp Widgets: pass widget to QStyle::pixelMetric() 2024-01-16 00:01:43 +01:00
qgraphicslayoutstyleinfo_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicslinearlayout.cpp Layouts docs: pass parent widget in the ctor 2022-10-21 00:57:24 +02:00
qgraphicslinearlayout.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicsproxywidget.cpp Doc: Remove duplicate words 2023-02-28 16:53:10 +00:00
qgraphicsproxywidget.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicsproxywidget_p.h Include what you need: <QPointer> 2023-10-12 21:38:54 +02:00
qgraphicsscene.cpp Include what you need: <QPointer> 2023-10-12 21:38:54 +02:00
qgraphicsscene.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicsscene_bsp.cpp Port from qAsConst() to std::as_const() 2022-10-11 23:17:18 +02:00
qgraphicsscene_bsp_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicsscene_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicsscenebsptreeindex.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicsscenebsptreeindex_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicssceneevent.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicssceneevent.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicssceneindex.cpp Fix typos in docs and comments 2022-06-15 21:31:02 +02:00
qgraphicssceneindex_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicsscenelinearindex.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicsscenelinearindex_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicstransform.cpp Fix improper moc includes inside the Qt namespace 2022-06-19 21:32:48 -07:00
qgraphicstransform.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicstransform_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicsview.cpp Increase precision for QGraphicsView::AnchorUnderMouse 2024-01-22 14:18:09 +01:00
qgraphicsview.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicsview_p.h Include what you need: <QPointer> 2023-10-12 21:38:54 +02:00
qgraphicswidget.cpp Port from qAsConst() to std::as_const() 2022-10-11 23:17:18 +02:00
qgraphicswidget.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicswidget_p.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicswidget_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qsimplex_p.cpp Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qsimplex_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00