diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-03-26 08:27:02 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-03-26 08:27:02 +0100 |
commit | 8f1acd29e4d39383752899d6d05d484eb9d7935b (patch) | |
tree | e749c4bebdd49ff702dfaa062902cbb6016cfd82 /src/gui/kernel/qwindow_p.h | |
parent | 945198fd237a83348feb4537d811565a2c2cd8e0 (diff) | |
parent | 2fedce8ed8451fd9b14bc214dc26e79b0d5ab7bd (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I71cc71881fb638e207d83a8733bad8f267701c0f
Diffstat (limited to 'src/gui/kernel/qwindow_p.h')
-rw-r--r-- | src/gui/kernel/qwindow_p.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h index 25f9a8a9b2..b8fa77bef0 100644 --- a/src/gui/kernel/qwindow_p.h +++ b/src/gui/kernel/qwindow_p.h @@ -90,6 +90,7 @@ public: , receivedExpose(false) , positionPolicy(WindowFrameExclusive) , positionAutomatic(true) + , resizeAutomatic(true) , contentOrientation(Qt::PrimaryOrientation) , opacity(qreal(1.0)) , minimumSize(0, 0) @@ -156,6 +157,8 @@ public: virtual void processSafeAreaMarginsChanged() {}; bool isPopup() const { return (windowFlags & Qt::WindowType_Mask) == Qt::Popup; } + void setAutomaticPositionAndResizeEnabled(bool a) + { positionAutomatic = resizeAutomatic = a; } static QWindowPrivate *get(QWindow *window) { return window->d_func(); } @@ -179,6 +182,11 @@ public: bool receivedExpose; PositionPolicy positionPolicy; bool positionAutomatic; + // resizeAutomatic suppresses resizing by QPlatformWindow::initialGeometry(). + // It also indicates that width/height=0 is acceptable (for example, for + // the QRollEffect widget) and is thus not cleared in setGeometry(). + // An alternative approach might be using -1,-1 as a default size. + bool resizeAutomatic; Qt::ScreenOrientation contentOrientation; qreal opacity; QRegion mask; |