summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/QtUiTools/CMakeLists.txt1
-rw-r--r--tests/QtUiTools/bug_392.py2
-rw-r--r--tests/QtUiTools/bug_913.py23
-rw-r--r--tests/QtUiTools/bug_913.ui57
4 files changed, 82 insertions, 1 deletions
diff --git a/tests/QtUiTools/CMakeLists.txt b/tests/QtUiTools/CMakeLists.txt
index 02fb89d..9acc9f3 100644
--- a/tests/QtUiTools/CMakeLists.txt
+++ b/tests/QtUiTools/CMakeLists.txt
@@ -5,5 +5,6 @@ PYSIDE_TEST(bug_426.py)
PYSIDE_TEST(bug_552.py)
PYSIDE_TEST(bug_797.py)
PYSIDE_TEST(bug_909.py)
+PYSIDE_TEST(bug_913.py)
PYSIDE_TEST(uiloader_test.py)
PYSIDE_TEST(ui_test.py)
diff --git a/tests/QtUiTools/bug_392.py b/tests/QtUiTools/bug_392.py
index 69817ff..c6e751f 100644
--- a/tests/QtUiTools/bug_392.py
+++ b/tests/QtUiTools/bug_392.py
@@ -19,7 +19,7 @@ class BugTest(UsesQApplication):
filePath = os.path.join(os.path.dirname(__file__), 'action.ui')
result = loader.load(filePath, w)
- self.assert_(isinstance(result.statusbar.actionFoo, QtGui.QAction))
+ self.assert_(isinstance(result.actionFoo, QtGui.QAction))
def testPythonCustomWidgets(self):
w = QtGui.QWidget()
diff --git a/tests/QtUiTools/bug_913.py b/tests/QtUiTools/bug_913.py
new file mode 100644
index 0000000..f42ce4a
--- /dev/null
+++ b/tests/QtUiTools/bug_913.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import sys
+import unittest
+from helper import adjust_filename
+
+from PySide.QtCore import *
+from PySide.QtGui import *
+from PySide.QtUiTools import *
+
+class TestBug913 (unittest.TestCase):
+
+ def testIt(self):
+ app = QApplication([])
+
+ loader = QUiLoader()
+ widget = loader.load(adjust_filename('bug_913.ui', __file__))
+ widget.tabWidget.currentIndex() # direct child is available as member
+ widget.le_first.setText('foo') # child of QTabWidget must also be available!
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/QtUiTools/bug_913.ui b/tests/QtUiTools/bug_913.ui
new file mode 100644
index 0000000..0fc95fd
--- /dev/null
+++ b/tests/QtUiTools/bug_913.ui
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Form</class>
+ <widget class="QWidget" name="Form">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>300</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QTabWidget" name="tabWidget">
+ <widget class="QWidget" name="tab">
+ <attribute name="title">
+ <string>Tab 1</string>
+ </attribute>
+ <layout class="QFormLayout" name="formLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>First name:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="le_first"/>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Last name:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="le_last"/>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tab_2">
+ <attribute name="title">
+ <string>Tab 2</string>
+ </attribute>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>