aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui/bug_964.py
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/bug_964.py
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/bug_964.py')
-rw-r--r--tests/QtGui/bug_964.py18
1 files changed, 18 insertions, 0 deletions
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()