Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.13.1
-
None
-
-
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);