diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2013-05-29 15:22:32 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-30 12:07:24 +0200 |
commit | 5e3d81ecfe0a14be2e1028a15df80df16d301db2 (patch) | |
tree | 074169ac9254a5ff4df34e59bec0b0ae38022ace /examples/quick/demos/calqlatr/calqlatr.qml | |
parent | 251a267fb5a48790b1446b5eda3ee553cd4abfab (diff) |
Fix various bugs in calqlatr
It's still not a great example but at least it's somewhat usable now.
- added files to .pro so you see them all in Creator
- keypad is fixed size and the "tape" takes up the rest, so you can
resize the window to be able to see long numbers
- you can flick the ListView (MouseArea not on top of the whole thing!)
- ListView scrolls to the bottom when you add numbers past the point
that scrolling is necessary to see them
- Clear, sqrt and +/- keys are functional
Task-number: QTBUG-26556
Change-Id: I485e4123ad6c24ca64bad3efc3acfc14587268d8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Diffstat (limited to 'examples/quick/demos/calqlatr/calqlatr.qml')
-rw-r--r-- | examples/quick/demos/calqlatr/calqlatr.qml | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/examples/quick/demos/calqlatr/calqlatr.qml b/examples/quick/demos/calqlatr/calqlatr.qml index 16b2e19724..0a092c25da 100644 --- a/examples/quick/demos/calqlatr/calqlatr.qml +++ b/examples/quick/demos/calqlatr/calqlatr.qml @@ -57,7 +57,7 @@ Rectangle { Item { id: pad - width: window.width * 0.58 + width: 180 NumberPad { y: 10; anchors.horizontalCenter: parent.horizontalCenter } } @@ -77,7 +77,7 @@ Rectangle { Display { id: display x: -16 - width: window.width * 0.42 + width: window.width - pad.width height: parent.height MouseArea { @@ -85,7 +85,12 @@ Rectangle { property real oldP: 0 property bool rewind: false - anchors.fill: parent + anchors { + bottom: parent.bottom + left: parent.left + right: parent.right + } + height: 50 onPositionChanged: { var reverse = startX > window.width / 2 var mx = mapToItem(window, mouse.x).x |