|
SplitView is an important tool for desktop applications that do not
want to use a dock widget-style approach for their user interface.
It allows users to have some degree of control over the sizing of
elements in the UI, as well as the ability to conveniently serialize
those sizes so that they're remembered across sessions.
The main differences between this and the SplitView in
Qt Quick Controls 1 are:
- Has its own SplitView attached properties, rather than relying on
the Layout attached properties (which required an additional import).
- Uses the attached preferredWidth and preferredHeight properties
as well as Item's implicitWidth/implicitHeight properties
for the preferred size of items, rather than using the width and
height properties.
- Inherits from Container, so supports most of its API (though some
parts of the API, like the currentIndex-related stuff, make no
sense for SplitView).
- Uses attached SplitHandle properties for the handle delegate to
visualize hovered/pressed effects.
- Offers convenience API for serializing the user's preferred sizes.
[ChangeLog][Controls][SplitView] Introduced SplitView, a control that
lays out items horizontally or vertically with a draggable splitter
between each item.
Task-number: QTBUG-56318
Change-Id: I3da91643ab312eb9ef5b0567da4e758f17747192
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|