Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
Some future release
-
None
Description
The relative stacking order between QWindows is not properly defined, nor easily controlled.
You can raise() or lower() a window, but that will bring it to the top or bottom of the stack. To ensure a consistent ordering between 3 windows you need to raise or lower them in a loop. A problem with this is that raising() all 3 windows will also raise them above other application windows that they might have been behind originally. Ie there's no way to go from:
- QWindow 1
- QWindow 2
- Other app window
- QWindow 3
to
- QWindow 2
- QWindow 1
- Other app window
- QWindow 3
as today that will result in
- Other app window
- QWindow 2
- QWindow 1
- QWindow 3
The inability to selectively raise or lower windows relative to each other is also problematic due to how stacking order is set up initially.
One would think it would be the order of setParent calls, but those parent relationships are not reflected until the platform window is created. And the creation order of sibling windows may not be the same as the original setParent call order.
Without a way to set relative stacking for individual windows one is left to carefully control the creation order of windows, which is fragile.
Platform APIs that could back this:
- macOS: [NSWindow orderWindow:relativeTo:] and [NSView addSubview:positioned:relativeTo:]
Attachments
Issue Links
- resulted from
-
QTBUG-116183 Investigate QPA/QtGui enablers for window embedding
- Closed