diff options
author | Richard Moe Gustavsen <richard.gustavsen@digia.com> | 2013-03-13 17:22:36 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-14 21:14:41 +0100 |
commit | 002cbc549ea8501d116407c28edacdc054113fd0 (patch) | |
tree | 161fd7e84c03a97d34c06c407590f5d0cde6c8b1 /src/controls/SplitView.qml | |
parent | 98870987d93bf300953adb9d2c63c0f65edfb7b8 (diff) |
SplitView: add property 'resizing'
This will be set to 'true' when any of the splitter handles are
being dragged
Change-Id: I715f8107ff1844b97df27d649f2d48785476adf9
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/controls/SplitView.qml')
-rw-r--r-- | src/controls/SplitView.qml | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/controls/SplitView.qml b/src/controls/SplitView.qml index ba082f8bd..39b7d7733 100644 --- a/src/controls/SplitView.qml +++ b/src/controls/SplitView.qml @@ -120,7 +120,7 @@ Item { between the first and the second item will get index 0, the next handle index 1 etc. \li bool \c pressed: the handle is being pressed. - \li bool \c dragged: the handle is being dragged. + \li bool \c resizing: the handle is being dragged. \endlist */ property Component handleDelegate: Rectangle { @@ -129,6 +129,12 @@ Item { color: Qt.darker(pal.window, 1.5) } + /*! + This propery is \c true when the user is resizing any of the items by + dragging on the splitter handles. + */ + property bool resizing: false + /*! \internal */ default property alias __contents: contents.data /*! \internal */ @@ -295,7 +301,7 @@ Item { property int handleIndex: -1 property alias containsMouse: mouseArea.containsMouse property alias pressed: mouseArea.pressed - property bool dragged: mouseArea.drag.active + property bool resizing: mouseArea.drag.active visible: __items[handleIndex + ((d.expandingIndex >= handleIndex) ? 0 : 1)].visible sourceComponent: handleDelegate @@ -303,6 +309,7 @@ Item { onHeightChanged: d.updateLayout() onXChanged: moveHandle() onYChanged: moveHandle() + onResizingChanged: root.resizing = resizing MouseArea { id: mouseArea |