9 class TestWidget(QTabWidget):
10 def __init__(self, ui_class, parent=MaxPlus.GetQMaxMainWindow()):
11 QTabWidget.__init__(self, parent)
15 def test_load_ascii_ui_path(ui_path):
16 ui_class, base_class = MaxPlus.LoadUiType(ui_path)
17 instance = TestWidget(ui_class)
21 ui_path = os.path.join(os.path.dirname(__file__),
"test_ui.ui")
22 test_load_ascii_ui_path(ui_path)
24 test_load_ascii_ui_path(
u'%s' % ui_path)
27 test_load_ascii_ui_path(
u'D:/你好')
28 except UnicodeEncodeError:
31 print "Error: unexpected exception"
34 if __name__ ==
"__main__":