diff options
Diffstat (limited to 'src/quicktemplates2/qquickdrawer.cpp')
-rw-r--r-- | src/quicktemplates2/qquickdrawer.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/quicktemplates2/qquickdrawer.cpp b/src/quicktemplates2/qquickdrawer.cpp index cbed2fdb..f2d74b31 100644 --- a/src/quicktemplates2/qquickdrawer.cpp +++ b/src/quicktemplates2/qquickdrawer.cpp @@ -180,15 +180,6 @@ public: void reposition() override; }; -QQuickDrawerPrivate::QQuickDrawerPrivate() - : edge(Qt::LeftEdge), - offset(0), - position(0), - dragMargin(QGuiApplication::styleHints()->startDragDistance()) -{ - setEdge(Qt::LeftEdge); -} - qreal QQuickDrawerPrivate::offsetAt(const QPointF &point) const { qreal offset = positionAt(point) - position; @@ -627,6 +618,10 @@ bool QQuickDrawerPrivate::setEdge(Qt::Edge e) QQuickDrawer::QQuickDrawer(QObject *parent) : QQuickPopup(*(new QQuickDrawerPrivate), parent) { + Q_D(QQuickDrawer); + d->dragMargin = QGuiApplication::styleHints()->startDragDistance(); + d->setEdge(Qt::LeftEdge); + setFocus(true); setModal(true); setFiltersChildMouseEvents(true); |