Use a PlasmaComponents.Dialog in tca
This commit is contained in:
parent
6461683f58
commit
603c6e4a9b
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user