diff options
author | Adriano Rezende <adriano.1.rezende@nokia.com> | 2012-07-04 17:02:14 +0200 |
---|---|---|
committer | Jens Bache-Wiig <jens.bache-wiig@nokia.com> | 2012-07-05 10:28:31 +0200 |
commit | 7dfe54c9808ed3057fa2f42b684a8b28a1bd22ce (patch) | |
tree | c3760c6febb99f14a01a2b927473079c7ae875c2 | |
parent | db21c0018548f933bde1722521679453ec960bb6 (diff) | |
download | qtquickcontrols-7dfe54c9808ed3057fa2f42b684a8b28a1bd22ce.tar.gz |
Fix Splitters to use new API
Change-Id: I7ce96151cfb57c46f5132e70530c2ec339ff59ae
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com>
-rw-r--r-- | components/SplitterColumn.qml | 7 | ||||
-rw-r--r-- | components/SplitterRow.qml | 6 | ||||
-rw-r--r-- | tests/manual/splitter.qml | 36 |
3 files changed, 39 insertions, 10 deletions
diff --git a/components/SplitterColumn.qml b/components/SplitterColumn.qml index 4f64868b..8b1d56b5 100644 --- a/components/SplitterColumn.qml +++ b/components/SplitterColumn.qml @@ -153,12 +153,9 @@ Private.Splitter { anchors.fill: parent anchors.topMargin: (parent.height <= 1) ? -2 : 0 anchors.bottomMargin: (parent.height <= 1) ? -2 : 0 - drag.axis: Qt.XandYAxis // Why doesn't X-axis work? + drag.axis: Drag.XandYAxis // Why doesn't X-axis work? drag.target: handle - CursorArea { - anchors.fill: parent - cursor: CursorArea.SplitVCursor - } + cursorShape: Qt.SplitVCursor } } } diff --git a/components/SplitterRow.qml b/components/SplitterRow.qml index c1466c61..e8be6acc 100644 --- a/components/SplitterRow.qml +++ b/components/SplitterRow.qml @@ -155,11 +155,7 @@ Private.Splitter { anchors.rightMargin: (parent.width <= 1) ? -2 : 0 drag.axis: Qt.YAxis drag.target: handle - - CursorArea { - anchors.fill: parent - cursor: CursorArea.SplitHCursor - } + cursorShape: Qt.SplitHCursor } } } diff --git a/tests/manual/splitter.qml b/tests/manual/splitter.qml new file mode 100644 index 00000000..0747eed9 --- /dev/null +++ b/tests/manual/splitter.qml @@ -0,0 +1,36 @@ +import QtQuick 2.0 +import QtDesktop 0.2 + +ApplicationWindow { + width: 400 + height: 200 + + Row { + SplitterColumn { + width: 200 + height: 200 + + Button { + text: "Button 1" + } + Button { + text: "Button 2" + } + Button { + text: "Button 2" + } + } + + SplitterRow { + width: 200 + height: 200 + + Button { + text: "Button 1" + } + Button { + text: "Button 2" + } + } + } +} |