dock/qml/TopLevelMenu.qml

33 lines
569 B
QML
Raw Normal View History

2021-03-20 02:17:41 -07:00
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Window 2.12
import QtQuick.Layouts 1.12
Window {
id: control
visible: false
width: _mainLayout.implicitWidth
height: _mainLayout.implicitHeight
flags: Qt.Popup
onActiveChanged: {
if (!active)
control.close()
}
default property alias content: _mainLayout.data
function open() {
control.visible = true
control.x = 500
control.y = 500
}
ColumnLayout {
id: _mainLayout
anchors.fill: parent
}
}