Use a PlasmaComponents.Dialog in tca

This commit is contained in:
Sebastian Kügler 2013-02-20 06:57:39 +01:00
parent 6461683f58
commit 603c6e4a9b
2 changed files with 23 additions and 5 deletions

View File

@ -74,7 +74,7 @@ PlasmaComponents.Page {
iconSource: "dialog-ok-apply"
checkable: true
//onCheckedChanged: pcDialog.visible = checked
onCheckedChanged: pcompDialog.visible = checked
onCheckedChanged: pcDialog.visible = checked
}
PlasmaComponents.Label {
text: pcDialog.visible ? "shown" : "hidden"
@ -84,6 +84,8 @@ PlasmaComponents.Page {
id: pcDialog
windowFlags: Qt.Popup
mainItem: dContent2
color: Qt.rgba(0,0,0,0)
DialogContent {
id: dContent2
onCloseMe: pcDialog.visible = false
@ -103,14 +105,30 @@ PlasmaComponents.Page {
text: pcompDialog.visible ? "shown" : "hidden"
}
PlasmaCore.Dialog {
PlasmaComponents.Dialog {
id: pcompDialog
windowFlags: Qt.Popup
mainItem: dContent3
//windowFlags: Qt.Popup
content: dContent3
DialogContent {
id: dContent3
onCloseMe: pcompDialog.visible = false
}
buttons: PlasmaComponents.ButtonRow {
PlasmaComponents.Button {
text: "Close";
onClicked: {
print("Closing...");
pcompDialog.close()
}
}
PlasmaComponents.Button {
text: "Accept";
onClicked: {
print("Accepting...");
pcompDialog.accept()
}
}
}
}
}
}

View File

@ -24,7 +24,7 @@ import org.kde.plasma.core 0.1 as PlasmaCore
Rectangle {
id: root
color: "black"
color: Qt.rgba(0,0,0,64); // translucent black
width: 640
height: 480