Exemple #1
0
    def testLoadFileUnicodeFilePath(self):
        filePath = str(os.path.join(os.path.dirname(__file__), 'test.ui'))
        loader = QUiLoader()
        parent = QWidget()
        w = loader.load(filePath, parent)
        self.assertNotEqual(w, None)

        self.assertEqual(len(parent.children()), 1)

        child = w.findChild(QWidget, "child_object")
        self.assertNotEqual(child, None)
        self.assertEqual(w.findChild(QWidget, "grandson_object"), child.findChild(QWidget, "grandson_object"))
Exemple #2
0
    def testLoadFileUnicodeFilePath(self):
        filePath = str(os.path.join(os.path.dirname(__file__), 'test.ui'))
        loader = QUiLoader()
        parent = QWidget()
        w = loader.load(filePath, parent)
        self.assertNotEqual(w, None)

        self.assertEqual(len(parent.children()), 1)

        child = w.findChild(QWidget, "child_object")
        self.assertNotEqual(child, None)
        self.assertEqual(w.findChild(QWidget, "grandson_object"),
                         child.findChild(QWidget, "grandson_object"))