diff options
Diffstat (limited to 'tests/qtgui/qmainwindow_test.py')
-rw-r--r-- | tests/qtgui/qmainwindow_test.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/qtgui/qmainwindow_test.py b/tests/qtgui/qmainwindow_test.py new file mode 100644 index 000000000..fce145d53 --- /dev/null +++ b/tests/qtgui/qmainwindow_test.py @@ -0,0 +1,32 @@ +import unittest +import sys + +from PySide import QtGui +from PySide import QtCore + +from helper import UsesQApplication + +class MainWindow(QtGui.QMainWindow): + def __init__(self): + QtGui.QMainWindow.__init__(self) + + self.createToolbar() + + def createToolbar(self): + pointerButton = QtGui.QToolButton() + pointerToolbar = self.addToolBar("Pointer type") + pointerToolbar.addWidget(pointerButton) + + +class TestMainWindow(UsesQApplication): + + def testCreateToolbar(self): + w = MainWindow() + w.show() + QtCore.QTimer.singleShot(1000, self.app.quit) + self.app.exec_() + + +if __name__ == '__main__': + unittest.main() + |