From 449e659ded8eae963fa60ec7e1c6780b3c90a442 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 25 Feb 2014 16:30:13 +0100 Subject: [PATCH] Dialog don't have borders. ever. --- src/declarativeimports/core/dialog.cpp | 6 ++++++ src/declarativeimports/core/dialog.h | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/src/declarativeimports/core/dialog.cpp b/src/declarativeimports/core/dialog.cpp index d4a45f05c..504a7e1fb 100644 --- a/src/declarativeimports/core/dialog.cpp +++ b/src/declarativeimports/core/dialog.cpp @@ -411,6 +411,12 @@ QObject *DialogProxy::margins() const return m_frameSvgItem->margins(); } +void DialogProxy::setFramelessFlags(Qt::WindowFlags flags) +{ + setFlags(Qt::FramelessWindowHint|flags); + emit flagsChanged(); +} + void DialogProxy::adjustGeometry(const QRect &geom) { setGeometry(geom); diff --git a/src/declarativeimports/core/dialog.h b/src/declarativeimports/core/dialog.h index 49b2cc18c..d114c7437 100644 --- a/src/declarativeimports/core/dialog.h +++ b/src/declarativeimports/core/dialog.h @@ -98,6 +98,8 @@ class DialogProxy : public QQuickWindow, public QQmlParserStatus **/ Q_PROPERTY(bool outputOnly READ isOutputOnly WRITE setOutputOnly NOTIFY outputOnlyChanged) + Q_PROPERTY(Qt::WindowFlags flags READ flags WRITE setFramelessFlags NOTIFY flagsChanged) + Q_CLASSINFO("DefaultProperty", "mainItem") public: @@ -125,6 +127,7 @@ public: QObject *margins() const; + void setFramelessFlags(Qt::WindowFlags flags); /* * set the dialog position. subclasses may change it. ToolTipDialog adjusts the position in an animated way */ @@ -156,6 +159,7 @@ Q_SIGNALS: void hideOnWindowDeactivateChanged(); void outputOnlyChanged(); void transientParentChanged(); + void flagsChanged(); public Q_SLOTS: void syncMainItemToSize();