Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.12.1
-
None
Description
import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Controls 2.4 ApplicationWindow { id: rootWindow visible: true width: 400 height: 400 title: qsTr("Hello World") header: ToolBar {} Popup { id: popup anchors.centerIn: parent width: 300 height: 300 modal: true padding: 0 Rectangle { anchors.fill: parent color: "red" } Component.onCompleted: open() } }
popup center is rootWindow.center + rootWindow.header.height, it's useless behaviour.
another example:
import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Controls 2.4 ApplicationWindow { id: rootWindow visible: true width: 400 height: 400 title: qsTr("Hello World") header: ToolBar {} Popup { id: popup anchors.centerIn: parent width: 300 height: rootWindow.height modal: true padding: 0 Rectangle { anchors.fill: parent color: "red" } Component.onCompleted: open() } }
where is popup.center now? rootWindow.center + rootWindow.header.height / 2?
why does it work like this?