Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
5.15.2
-
None
Description
Reposition breaks for Dialog from QtQuick.Controls 2.15 with overrided enter/exit Transition for scale.
1. Push the button to open Dialog
2. Close dialog
3. Push the button again to open Dialog
[Result]
Dialog opens not centered in parent
root of the problem caused by changes QQuickPopupPositioner::reposition() for using scale to calculate width/height of popupItem
import QtQuick 2.15 import QtQuick.Controls 2.15 ApplicationWindow { id: window width: 640 height: 480 visible: true title: qsTr("Stack") Dialog { id: dialog anchors.centerIn: parent implicitWidth: 400 implicitHeight: 100 enter: Transition { // grow_in NumberAnimation { property: "scale"; from: 0.1; to: 1.0; easing.type: Easing.OutQuint; duration: 300 } } exit: Transition { // shrink_out NumberAnimation { property: "scale"; from: 1.0; to: 0.1; easing.type: Easing.OutQuint; duration: 300 } } contentItem: Rectangle { color: "lightskyblue" Text { text: "Hello blue sky!" color: "navy" anchors.centerIn: parent } } } Button { anchors.centerIn: parent text: "Push me" onClicked: { dialog.open() } } }
Attachments
Issue Links
- duplicates
-
QTBUG-87283 REG: Popup position changes after opening once
- Closed