aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-08-16 16:12:14 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:44 -0300
commitf0ea617acb86d81d3ce9b2ec5f5dc8aba2e299a5 (patch)
treea7c014f74479761bda7e0833b8f5740e27719b0e /tests/QtGui
parent48015c2bdc6f602abd7800098e1749fb946cf05a (diff)
Fix bug 964 - "QAbstractItemView.moveCursor() method is missing"
Reviewer: Marcelo Lira <marcelol.lira@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'tests/QtGui')
-rw-r--r--tests/QtGui/CMakeLists.txt1
-rw-r--r--tests/QtGui/bug_964.py18
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt
index 4c5202c43..4e621c84c 100644
--- a/tests/QtGui/CMakeLists.txt
+++ b/tests/QtGui/CMakeLists.txt
@@ -69,6 +69,7 @@ PYSIDE_TEST(bug_882.py)
PYSIDE_TEST(bug_919.py)
PYSIDE_TEST(bug_921.py)
PYSIDE_TEST(bug_941.py)
+PYSIDE_TEST(bug_964.py)
PYSIDE_TEST(customproxywidget_test.py)
PYSIDE_TEST(deepcopy_test.py)
PYSIDE_TEST(event_filter_test.py)
diff --git a/tests/QtGui/bug_964.py b/tests/QtGui/bug_964.py
new file mode 100644
index 000000000..61fecbae5
--- /dev/null
+++ b/tests/QtGui/bug_964.py
@@ -0,0 +1,18 @@
+import unittest
+from PySide.QtCore import *
+from PySide.QtGui import *
+
+class TestBug964 (unittest.TestCase):
+
+ def testIt(self):
+ app = QApplication([])
+ model = QStringListModel(["1", "2"])
+ view = QListView()
+ view.setModel(model)
+ view.setCurrentIndex(model.index(0,0))
+ newCursor = view.moveCursor(QAbstractItemView.MoveDown, Qt.NoModifier)
+ self.assertEqual(newCursor.row(), 1)
+ self.assertEqual(newCursor.column(), 0)
+
+if __name__ == "__main__":
+ unittest.main()