feat(Paned): supports a defaultClosed property

This commit is contained in:
Ronan Abhamon 2016-10-06 14:23:32 +02:00
parent 46a9e88c84
commit cf031ea434
2 changed files with 5 additions and 0 deletions

View file

@ -26,6 +26,7 @@ Item {
property alias childA: contentA.data
property alias childB: contentB.data
property bool defaultClosed
property int closingEdge: Qt.LeftEdge
// User limits: string or int values.
@ -209,7 +210,10 @@ Item {
_minimumLeftLimit = _parseLimit(minimumLeftLimit)
_minimumRightLimit = _parseLimit(minimumRightLimit)
_isClosed = defaultClosed
contentA.width = _getLimitValue(_minimumLeftLimit)
_applyLimits()
}
Item {

View file

@ -28,6 +28,7 @@ Window {
childB: Paned {
anchors.fill: parent
closingEdge: Qt.RightEdge
defaultClosed: true
minimumLeftLimit: '40%'
minimumRightLimit: 200