summaryrefslogtreecommitdiffstats
path: root/tests/QtUiTools
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtUiTools')
-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()