Don't use centerIn on popup on Qt < 5.12

This commit is contained in:
Nicolas Werner 2021-01-12 15:55:36 +01:00
parent 826a5cfb14
commit 14cb3bfe10

View file

@ -5,9 +5,15 @@ import im.nheko 1.0
Popup { Popup {
modal: true modal: true
anchors.centerIn: parent
palette: colors palette: colors
// only set the anchors on Qt 5.12 or higher
// see https://doc.qt.io/qt-5/qml-qtquick-controls2-popup.html#anchors.centerIn-prop
Component.onCompleted: {
if (anchors)
anchors.centerIn = parent;
}
ColumnLayout { ColumnLayout {
spacing: 16 spacing: 16