summaryrefslogtreecommitdiffstats
path: root/tests/QtGui/bug_300_test.py
blob: ec02cdf02a2b5e3a3128a9de6785cea59ee947fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from PySide.QtGui import QStringListModel
from PySide.QtCore import QModelIndex
import unittest

class TestQAbstractItemModelSignals(unittest.TestCase):
    def sigCallback(self, index, r, c):
        self._called = True

    def testSignals(self):
        self._called = False
        m = QStringListModel()
        m.rowsAboutToBeInserted[QModelIndex,int,int].connect(self.sigCallback)
        m.insertRows(0, 3)
        self.assert_(self._called)

if __name__ == '__main__':
    unittest.main()