[PySide] pysideuic tool with custom widgets

Alberto Soto alberto.soto at lmsintl.com
Mon Jun 25 17:50:38 CEST 2012


I'm trying to use the pysideuic tool to generate code from an UI that contains some custom plugins.
I created a file to deal with the custom module import, and it works well.
But now, I've got a problem regarding a custom widget which inherits from QComboBox. 
When I add some items using the QtDesigner, the .ui file correctly mentions these items, 
but the generated python code doesn't write the "setItemText" call,  resulting in an empty combo box.
I tried to figure out why this line is not written, and it seems that this case is not handled by pysideuic : 
 the handleItem() function in the uiparser.py script only deals with qtproxies.QComboBox and doesn't handle
the case of derived classes  (same thing for QListWidget, QTreeWidget, .).

Do you have a generic solution to manage this case or is this a limitation of the tool ?


More information about the PySide mailing list