Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.1
-
44060d2129b461754f6bd86153889a869f12440a
Description
N.B. below the implicitWidth/implicitHeight property names are used, based on the function names already present in QDeclarativeItem and used by the Row/Column/Grid QDeclarativeBasePositioner base-class, but other names for these new property would be fine too.
Access to and propagation of Items' implicit size is required in order to support flexible layout of compound items defined in QML-only where e.g. the item can be given an explicit size yet has a default size if no size is set (as supported by existing core Text and Image elements), or where the actual size/layout of an item and its children is a combination of the size the item's children wants to be (henceforth referred to as their implicitWidth/implicitHeight) and the explicit size of the parent item itself.
These are the required changes and additions:
1) The Item element needs implicitWidth/implicitHeight properties that default to width/height calculated in a similar way to childrenRect.width/childrenRect.height but based on the children's implicit size rather than their actual size. (can these be read-only or do we need to be able to override them?)
2) The TextEdit and Text elements have paintedWidth/painedHeight properties while the Image and BorderImage has sourceSize.width/sourceSize.height that seems to be the same as their implicit size. For these elements the Item's implicitWidth/implicitHeight needs to be bound to these properties.
3) The TextItem does not have paintedWidth/painedHeight properties and therefore needs to be extended for consistency with Text/TextEdit.
Attachments
Issue Links
- depends on
-
QTBUG-13451 Support property versioning in QML
- Closed