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

QQuickWidget::SizeViewToRootObject ignored by QVBoxLayout

XMLWordPrintable

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

      Qt 5.9.5
    • Linux/X11

      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.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:

                There are no open Gerrit changes