[PyKDE] PyQt4 custom widgets

Andreas Pakulat apaku at gmx.de
Mon Jan 9 19:05:09 GMT 2006


pyuic4 refuses to generate .py's for Forms that include non-standard

andreas at morpheus:~/projects/pyfilmdbsimpleui/widgets/ui>pyuic4 versionwidget.ui
DEBUG:root:UI version is 4.0
DEBUG:root:uiname is VersionWidget
Traceback (most recent call last):
  File "/home/andreas/python2.4/lib/python2.4/site-packages/PyQt4/uic/pyuic.py", line 44, in ?
    sys.exit(Compiler.compileUi(args[1], options))
  File "/home/andreas/python2.4/lib/python2.4/site-packages/PyQt4/uic/Compiler/__init__.py", line 44, in compileUi
    widget = ui_compiler.compileUi(input_file)
  File "/home/andreas/python2.4/lib/python2.4/site-packages/PyQt4/uic/Compiler/compiler.py", line 59, in compileUi
    return self.parse(filename)
  File "/home/andreas/python2.4/lib/python2.4/site-packages/PyQt4/uic/uiparser.py", line 379, in parse
  File "/home/andreas/python2.4/lib/python2.4/site-packages/PyQt4/uic/uiparser.py", line 350, in customWidgets
  File "/home/andreas/python2.4/lib/python2.4/site-packages/PyQt4/uic/Compiler/qobjectcreator.py", line 14, in addCustomWidget
    type(classname, (getattr(qtproxies, baseclass),),
AttributeError: 'module' object has no attribute ''

I think it should be possible to get this working as pyuic4 could just
assume that the needed custom widgets are placed in the same directory.
If somebody needs the possibility to spread ui-files around an option
could be added to put the path to the generated .py-files into pythons

I don't want to recode all those Ui's by hand.


Your business will go through a period of considerable expansion.

More information about the PyQt mailing list