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

GraphicsScene::itemsBoudningRect() behavior

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.14.2
    • Widgets: GraphicsView
    • None
    • Python 3.7.6 + PySide2 5.14.2 installed via pip
    • Windows

    Description

      SETUP: 

      Create a simple GraphicsView with one top item only used to create

      children (to act as a layer which can be shown/hidden). Create one

      line as unique child.

       
      ISSUE: 

      When using a QGraphicsLineItem() as top, the view is displayed as

      expected, showing the line crossing the viewport. But when using a

      QGraphicsRectItem(), then the display shows more than just the line

      --> the 'itemsBoundingRect()' starts at (0,0) as top corner.

       

       

      Why this difference ?

      What is the recommended way to create an "empty" top level item ?

      Attachments

        1. bug_pyside.py
          0.6 kB
        2. pyside-1274.py
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            l.riesterer Laurent Riesterer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes