Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
5.12.0 Beta 2
-
None
Description
When QGraphicsTextItem receives focus or its text is modified, it ensures item is visible in all QGraphicsViews as documented here: http://doc.qt.io/qt-5/qgraphicstextitem.html#setPlainText
This can be troublesome especially for UIs which use multiple QGraphicsViews for a single UI component. For example Qt 3D Studio timeline currently contains hack to disable this behavior by overriding QGraphicsView::scrollContentsBy() as seen here http://code.qt.io/cgit/qt3dstudio/qt3dstudio.git/tree/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/TreeHeaderView.cpp
But if you want to disable this behavior while keeping rest of scrolling behavior, things become more complicated. There should be a cleaner way to avoid QGraphicsTextItem not causing ensureVisibility or QGraphicsView not reacting to these.
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-71241 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
243119,1 | Allow QGraphicsTextItem to not ensure visibility | dev | qt/qtbase | Status: NEW | 0 | 0 |
243147,1 | WIP: Use setEnsureVisibity() instead of custom QGraphicsView | master | qt3dstudio/qt3dstudio | Status: NEW | -2 | 0 |