diff --git a/declarativeimports/core/dialog.cpp b/declarativeimports/core/dialog.cpp index 1d6c2ca1d..427927dc0 100644 --- a/declarativeimports/core/dialog.cpp +++ b/declarativeimports/core/dialog.cpp @@ -350,6 +350,11 @@ int DialogProxy::windowFlags() const return (int)m_flags; } +qulonglong DialogProxy::windowId() const +{ + return m_dialog->winId(); +} + void DialogProxy::setWindowFlags(const int flags) { /*X misbehaviour: the only way to make a window with the Popup flag working, is to create it with that flag from the beginning*/ diff --git a/declarativeimports/core/dialog.h b/declarativeimports/core/dialog.h index 33ab07af2..1864eb736 100644 --- a/declarativeimports/core/dialog.h +++ b/declarativeimports/core/dialog.h @@ -140,6 +140,11 @@ class DialogProxy : public QObject */ Q_PROPERTY(int location READ location WRITE setLocation NOTIFY locationChanged) + /** + * Window ID of the dialog window. + **/ + Q_PROPERTY(qulonglong windowId READ windowId CONSTANT) + public: enum WidgetAttribute { WA_X11NetWmWindowTypeDock = Qt::WA_X11NetWmWindowTypeDock @@ -180,6 +185,8 @@ public: QObject *margins() const; + qulonglong windowId() const; + /** * @returns The suggested screen position for the popup * @arg item the item the popup has to be positioned relatively to. if null, the popup will be positioned in the center of the window