Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-71241

Allow QGraphicsTextItem to not ensure visibility

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: 5.12.0 Beta 2
    • Fix Version/s: None
    • Component/s: Widgets: GraphicsView
    • Labels:
      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

        For Gerrit Dashboard: QTBUG-71241
        # Subject Branch Project Status CR V

          Activity

            People

            • Assignee:
              bibr Andreas Aardal Hanssen
              Reporter:
              kagro Kaj Grönholm
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews