compileUiFiles.py

changeset 3656
441956d8fce5
parent 3597
137370f7114b
child 3670
f0cb7579c0b4
equal deleted inserted replaced
3654:ffeb85cdc72d 3656:441956d8fce5
18 def compileUiFiles(): 18 def compileUiFiles():
19 """ 19 """
20 Compile the .ui files to Python sources. 20 Compile the .ui files to Python sources.
21 """ # __IGNORE_WARNING__ 21 """ # __IGNORE_WARNING__
22 try: 22 try:
23 from PyQt4.uic import compileUiDir 23 from PyQt5.uic import compileUiDir
24 except ImportError: 24 except ImportError:
25 from PyQt4.uic import compileUi 25 from PyQt5.uic import compileUi
26 26
27 def compileUiDir(dir, recurse=False, # __IGNORE_WARNING__ 27 def compileUiDir(dir, recurse=False, # __IGNORE_WARNING__
28 map=None, **compileUi_args): 28 map=None, **compileUi_args):
29 """ 29 """
30 Creates Python modules from Qt Designer .ui files in a directory or 30 Creates Python modules from Qt Designer .ui files in a directory or
31 directory tree. 31 directory tree.
32 32
33 Note: This function is a modified version of the one found in 33 Note: This function is a modified version of the one found in
34 PyQt4. 34 PyQt5.
35 35
36 @param dir Name of the directory to scan for files whose name ends 36 @param dir Name of the directory to scan for files whose name ends
37 with '.ui'. By default the generated Python module is created 37 with '.ui'. By default the generated Python module is created
38 in the same directory ending with '.py'. 38 in the same directory ending with '.py'.
39 @param recurse flag indicating that any sub-directories should be 39 @param recurse flag indicating that any sub-directories should be

eric ide

mercurial