summaryrefslogtreecommitdiffstats
path: root/src/gui/doc/snippets/textblock-formats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-11-21 18:13:41 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-12-13 18:52:17 +0000
commit3472aa6e28469ffd23cfa24e3933541f295e9e1d (patch)
tree11ca2fca9838abef68f7a06cee5a0e0c8a160baf /src/gui/doc/snippets/textblock-formats
parentc0b0cdcb61e5e8b5a0770a5c311b9fa38afbdeda (diff)
Use Qt::WindowNoState for child windows/widgets shown via show()
The Qt::WindowState enum is documented to specify the current state of top-level windows, and does not make sense for child windows. It's up to the client code to ensure any sizing of child windows/widgets, e.g. via layouts. Many of our QPA backends bail out on QPlatformWindow::setWindowState() for a child window. Ideally we would do this at a higher level, in QWindow, but that's a bigger task, and the semantics of what happens when a window is moved from being top level to child or back are not fully clear. As a first step, we ensure that the default window state when showing the window via show() is Qt::WindowNoState. Unfortunately, the QPlatformIntegration::defaultWindowState() API only takes into account the window flags, which sadly do not have a way to reflect whether the window is a child window or not (Qt::SubWindow is not a child window, see QTBUG-115729). We don't want to pass a QWindow to this API, as it would mean QWidget would need to create a window when requesting the default window state. Instead we hard-code the opt-out for child windows/widgets. [ChangeLog][Gui/Widgets] Child windows and widgets are now always shown in their normal state by show(). Pick-to: 6.7 Change-Id: Ie8caf2df2d854194b9985c9427a9eac1312aba65 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'src/gui/doc/snippets/textblock-formats')
0 files changed, 0 insertions, 0 deletions