summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-10-05 12:07:08 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-10-05 12:07:08 -0300
commit4adb686fc15dc3dfdb872157df27b534f1ca7f98 (patch)
treeadfc65d90a2a16288d92df44b16d843c31058829 /tests
parent7f4e85f6501aa58623244303cdaf6e129c02af4d (diff)
downloadpyside-4adb686fc15dc3dfdb872157df27b534f1ca7f98.tar.gz
pyside-4adb686fc15dc3dfdb872157df27b534f1ca7f98.tar.xz
pyside-4adb686fc15dc3dfdb872157df27b534f1ca7f98.zip
Extend QUiLoader test to test ui files with custom widgets.
Diffstat (limited to 'tests')
-rw-r--r--tests/QtUiTools/bug_392.py12
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()