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

Overlay does not respect QQuickWidget::SizeRootObjectToView

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.15.0 Beta3
    • 5.13.1
    • Quick: Controls 2
    • None
    • Windows
    • 7be805d155f48b2ee9dfcb80ae2919597d0adf5a (qt/qtdeclarative/5.15)
    • Shovelling Snow, Q1/2020 Finale

    Description

      When a dialog is shown in a QQuickWidget then the dialog's background does not correctly rescale when the QQuickWidget's size changes:

       

      import QtQuick 2.13
      import QtQuick.Window 2.13
      import QtQuick.Controls 2.10
      
      Page {
          id: page
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          Button {
              anchors.centerIn: parent
              text: "Open dialog"
              onClicked: dialog.open()
          }
      
          Dialog {
              id: dialog
              parent: page
              modal: true
              closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
      
              width: 200
              height: 100
      
              x: (parent.width - width) / 2
              y: (parent.height - height) / 2
          }
      }
      
      

      quickcontrols2.conf

      [Controls]
      Style=Material
      
      [Universal]
      Theme=Dark
      ;Accent=Steel
      
      [Material]
      Theme=Dark
      ;Accent=BlueGrey
      ;Primary=BlueGray
      

      The QQuickWidget is initialized as follows:

      m_quickWidget = new QQuickWidget(widget);
      m_quickWidget->setAttribute(Qt::WA_AcceptTouchEvents);
      m_quickWidget->setResizeMode(QQuickWidget::SizeRootObjectToView);
      

      Attachments

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

        Activity

          People

            mitch_curtis Mitch Curtis
            DanielSt Peter Staab
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes