[PyQt] uic.loadUiType does not consider uic plugin for top level widget
denis.rouzaud at gmail.com
Mon Oct 9 09:49:50 BST 2017
Hi Phil, hi list,
I have an issue using uic plugins for custom widgets.
The idea of the plugin (either MODULE or CW_FILTER) is to redirect import
from the c++ header of the custom widget to the proper python module.
This does not seem to be working for top level widgets.
I have a concrete example using QGIS' custom dock widget (QgsDockWidget).
When setting a UI file with this widget and using loadUiType, I get this
File "/usr/lib64/python2.7/site-packages/PyQt4/uic/__init__.py", line 215,
return (ui_globals[winfo["uiclass"]], getattr(QtGui,
AttributeError: 'module' object has no attribute 'QgsDockWidget'
Looking down to the code made think that there's something wrong in the
parser in setupObject where probably the top level widget is set without
taking care of the custom widgets.
Phil, does that speak to you?
Would you need me to try to track the issue to a more precise point?
Or to give you step to reproduce using QGIS?
Thanks a lot by advance,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt