Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.15.1, 5.15.2, 6.0.0
-
None
-
-
df33c79fb6579f94498164531777320e79c36fd5 (6.1)
Description
While QTBUG-84488 solved the scaling issue in popups, a new one appeared. The code bellow illustrates the issue:
import QtQuick 2.15 import QtQuick.Controls 2.15 import QtQuick.Window 2.15 /* * Run this passing the `--style material` option to `qmlscene`. * The first time you open the popup, all it's OK: * ______________________ * | __________________ | * | | | | * | | | | * | | | | * | | | | * | | | | * | | | | * | | | | * | | | | * | ------------------ | * ---------------------- * * The second... not so well: * ______________________ * | | * | __________________| * | | | * | | | * | | | * | | | * | | | * | | | * | | | * | | | * | | | * ---------------------- */ Window { Button { anchors.centerIn: parent text: "Open popup" onClicked: popup.open() } Popup { id: popup anchors.centerIn: parent width: parent.width - 20 height: parent.height - 20 Button { anchors.centerIn: parent text: "Close popup" onClicked: popup.close() } } } /* * A workaround is set the popup's position manually. For example: * * parent: Overlay.overlay * x: Math.round((parent.width - width) / 2) * y: Math.round((parent.height - height) / 2) * * I guess that is why this bug does not ocurr in a `ComboBox` */
Attachments
Issue Links
- is duplicated by
-
QTBUG-90891 Material ComboBox popup changes position on second interaction.
- Closed