On Tuesday 23 August 2011, Onur-Hayri Bakici wrote: > A little example of what I did. > Item { > > PlasmaWidgets.PushButton { > id: btn > text: "press me" > onClicked: { > dialog.visible = true; > } > } > > PlasmaCore.Dialog { > id: dialog > Component.onCompleted: { > setAttribute(Qt.WA_X11NetWmWindowTypeDock, true); > var pos = popupPosition(parent); // or popupPosition(btn)? > print("QPoint: " + pos.x + "," + pos.y); > } > } > }
better using btn.. anyways, you should position it on every mouse click, before showing it, so in onClicked: { var pos = popupPosition(btn); dialog.x = pos.x dialog.y = pos.y dialog.visible = true; } also, exactly why you are making it a dock? -- Marco Martin _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel