diff options
| author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2024-11-12 11:54:10 +0100 |
|---|---|---|
| committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2024-11-21 17:49:37 +0100 |
| commit | 6d4a717152ff0592fd433b4692119d768346c2c9 (patch) | |
| tree | 4c648265cc52718eca36380cecdb1ba938b70f3b /tests/manual/windowflags/controllerwindow.cpp | |
| parent | efa0d60fe465542c8233b1e6d9ed35806967c86c (diff) | |
Improve windowflags manual test
Group the Qt::CustomizeWindowHint specific flags separately, to make
it clear that they only apply if Qt::CustomizeWindowHint is set, and
give the QWindow preview window a title.
Add option to visualize the safe areas of the window.
Change-Id: I25ae7229b47ceaaa02f4be5a8210dbe44f54b6fa
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'tests/manual/windowflags/controllerwindow.cpp')
| -rw-r--r-- | tests/manual/windowflags/controllerwindow.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/manual/windowflags/controllerwindow.cpp b/tests/manual/windowflags/controllerwindow.cpp index 32979c1cd30..5823bc5360e 100644 --- a/tests/manual/windowflags/controllerwindow.cpp +++ b/tests/manual/windowflags/controllerwindow.cpp @@ -75,7 +75,7 @@ void ControllerWidget::updateStateControl() statesControl->setStates(activePreview->windowStates()); } -void ControllerWidget::updatePreview(QWindow *preview) +void ControllerWidget::updatePreview(PreviewWindow *preview) { activePreview = preview; @@ -91,7 +91,10 @@ void ControllerWidget::updatePreview(QWindow *preview) parentWindow->hide(); } + preview->setVisualizeSafeAreas(safeAreaCheckBox->isChecked()); + preview->setFlags(flags); + preview->update(); if (fixedSizeWindowCheckBox->isChecked()) { preview->setMinimumSize(preview->size()); @@ -172,8 +175,10 @@ void ControllerWidget::createTypeGroupBox() l = new QHBoxLayout; modalWindowCheckBox = createCheckBox(tr("Modal window")); fixedSizeWindowCheckBox = createCheckBox(tr("Fixed size window")); + safeAreaCheckBox = createCheckBox(tr("Visualize safe areas")); l->addWidget(modalWindowCheckBox); l->addWidget(fixedSizeWindowCheckBox); + l->addWidget(safeAreaCheckBox); additionalOptionsGroupBox->setLayout(l); } |
