Details
-
Technical task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
-
ddc80cc63 (dev)
Description
Suppose we have the following UI hierarchy:
QWidget ['widget'] (has a QHBoxLayout) QWidget ['windowContainer']. (Added to the QHBoxLayout) QQuickWindow QQuickItem ['rootItem']
If a developer is embedding a QQuickWindow inside a QLayout there are some expectations that we should try to meet:
- Sensible size hints and size policies are propagated from the QQuickWindow up to the QLayout (actually it should be enough to propagate it up to the "windowContainer" widget.
- If this works, the initial size of the 'widget' QWidget should be derived from the size of the 'rootItem'
- Remember that size hints includes both min,preferred and max size.
- Resizing the 'widget' might cause the QQuickWindow to be resized.
- How can size policies be communicated up from the 'rootItem' and to the 'windowContainer' while going via the QQuickWindow (that doesn't know much about size policies). Maybe createWindowContainer() can be a bit smarter in how 'upwards' size hint and size policy propagation is done? (e.g. if the QQuickWindow does not have an API to specify size policy - can it can plumb together size policy of the contentItem and the returned QWidget ?)
Note that the QQuickWindow can be embedded into a layout by first wrapping the QQuickWindow with:
QWidget *hostedQuickWindow = QWidget::createWindowContainer(quickWindow);
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-121798 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
548308,5 | Implement QWindowContainer::minimumSizeHint() | dev | qt/qtbase | Status: MERGED | +2 | 0 |