qtquick: Move the "Another" button into the main window

This commit is contained in:
Sergio Martins
2021-04-05 14:09:59 +01:00
parent 1026abbbf4
commit 0f09ba717f
2 changed files with 25 additions and 30 deletions

View File

@@ -10,38 +10,10 @@
*/
import QtQuick 2.9
import QtQuick.Controls 2.12
import com.kdab.dockwidgets 1.0 as KDDW
Guest {
anchors.fill: parent
background: "qrc:/assets/triangles.png"
logo: "qrc:/assets/KDAB_bubble_white.png"
KDDW.DockWidget {
id: another
uniqueName: "another1"
source: ":/Another.qml"
}
Button {
text: "Toggle Another"
anchors {
bottom: parent.bottom
left: parent.left
margins: 5
}
onClicked: {
if (another.dockWidget.visible) {
another.dockWidget.close();
} else {
another.dockWidget.show();
}
}
}
}