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

QQuickWidget::SizeViewToRootObject ignored by QVBoxLayout

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.9.5
    • Quick: Widget
    • None
    • Kubuntu 18.04

      Qt 5.9.5
    • Linux/X11

    Description

      If I put QQuickWidget, some QWidget and vertical QSpacerItem in QVBoxLayout and set QQuickWidget::ResizeMode = SizeViewToRootObject, I expect that QQuickWidget will have a size of its content and QWidget will be placed just below it.

      This is true unless content of QQuickWidget dynamically changes its size (for example some controls are shown/hidden). In this case, in spite QQuickWidget reports correct new sizeHint() the QVBoxLayout doesn't rearrange QWidget's position. It stays the same which could lead to empty spaces between widgets or widgets overlapping. It looks like QVBoxLayout doesn't understand that QQuickWidget has SizeViewToRootObject and thinks it has SizeRootObjectToView instead.

      Sample project is attached.

      Attachments

        Issue Links

          Activity

            People

              tvete Paul Olav Tvete
              truf Alexander Trufanov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: