Updated QtUiTools modue to works with python 2.x and 3.x
This commit is contained in:
parent
676b2b579d
commit
e90255bf7e
1 changed files with 3 additions and 3 deletions
|
|
@ -2,8 +2,8 @@ import unittest
|
||||||
import os
|
import os
|
||||||
from helper import UsesQApplication
|
from helper import UsesQApplication
|
||||||
|
|
||||||
from PySide.QtGui import *
|
from PySide.QtGui import QWidget
|
||||||
from PySide.QtUiTools import *
|
from PySide.QtUiTools import QUiLoader
|
||||||
|
|
||||||
def get_file_path():
|
def get_file_path():
|
||||||
for path in file_path:
|
for path in file_path:
|
||||||
|
|
@ -26,7 +26,7 @@ class QUioaderTeste(UsesQApplication):
|
||||||
self.assertEqual(w.findChild(QWidget, "grandson_object"), child.findChild(QWidget, "grandson_object"))
|
self.assertEqual(w.findChild(QWidget, "grandson_object"), child.findChild(QWidget, "grandson_object"))
|
||||||
|
|
||||||
def testLoadFileUnicodeFilePath(self):
|
def testLoadFileUnicodeFilePath(self):
|
||||||
filePath = unicode(os.path.join(os.path.dirname(__file__), 'test.ui'))
|
filePath = str(os.path.join(os.path.dirname(__file__), 'test.ui'))
|
||||||
loader = QUiLoader()
|
loader = QUiLoader()
|
||||||
parent = QWidget()
|
parent = QWidget()
|
||||||
w = loader.load(filePath, parent)
|
w = loader.load(filePath, parent)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue