diff options
author | renatofilho <renato.filho@openbossa.org> | 2010-10-05 12:07:08 -0300 |
---|---|---|
committer | renatofilho <renato.filho@openbossa.org> | 2010-10-05 12:07:08 -0300 |
commit | 4adb686fc15dc3dfdb872157df27b534f1ca7f98 (patch) | |
tree | adfc65d90a2a16288d92df44b16d843c31058829 | |
parent | 7f4e85f6501aa58623244303cdaf6e129c02af4d (diff) | |
download | pyside-4adb686fc15dc3dfdb872157df27b534f1ca7f98.tar.gz pyside-4adb686fc15dc3dfdb872157df27b534f1ca7f98.tar.xz pyside-4adb686fc15dc3dfdb872157df27b534f1ca7f98.zip |
Extend QUiLoader test to test ui files with custom widgets.
-rw-r--r-- | tests/QtUiTools/bug_392.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/QtUiTools/bug_392.py b/tests/QtUiTools/bug_392.py index ebda08c..5717d45 100644 --- a/tests/QtUiTools/bug_392.py +++ b/tests/QtUiTools/bug_392.py @@ -2,7 +2,7 @@ import unittest import os from helper import UsesQApplication -from PySide import QtCore, QtGui +from PySide import QtCore, QtGui, QtDeclarative from PySide.QtUiTools import QUiLoader class BugTest(UsesQApplication): @@ -14,6 +14,16 @@ class BugTest(UsesQApplication): result = loader.load(filePath, w) self.assertEqual(type(result.statusbar.actionFoo), QtGui.QAction) + def testCustomWidgets(self): + w = QtGui.QWidget() + loader = QUiLoader() + + filePath = os.path.join(os.path.dirname(__file__), 'customwidget.ui') + result = loader.load(filePath, w) + self.assert_(type(result.declarativeView), QtDeclarative.QDeclarativeView) + self.assert_(type(result.worldTimeClock), QtGui.QWidget) + + if __name__ == '__main__': unittest.main() |