Hello all,<div><br></div><div>Does anyone have an example on how to code the QtDesigner.QtDesigner.QPyDesignerCustomWidgetCollectionPlugin?</div><div><br></div><div>I am using Qt 4.7.0 and PyQt 4.7.4.</div><div><br></div><div>
I have coded something like:</div><div><br></div><div>class MyCustomWidget1Plugin(QPyDesignerCustomWidgetPlugin):</div><div><br></div><div> def createWidget(self, parent):</div><div> ...</div><div><br></div><div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><div>class MyCustomWidget2Plugin(QPyDesignerCustomWidgetPlugin):</div><div><br></div><div> def createWidget(self, parent):</div><div> ...</div></div>
<div><br></div><div><br></div><div>class MyCustomWidgetCollectionPlugin(QPyDesignerCustomWidgetCollectionPlugin):</div><div><br></div><div><div> def __init__(self, parent=None):</div><div> QPyDesignerCustomWidgetCollectionPlugin.__init__(parent)</div>
<div> self._plugins = [ MyCustomWidget1Plugin(self), MyCustomWidget2Plugin(self) ]</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>
print "CREATED"</div><div><br></div><div> def customWidgets(self):</div><div> return self._plugins</div></div><div><br></div><div>I see both my custom widgets in the designer without a problem but the MyCustomWidgetCollectionPlugin class never gets instanciated.</div>
<div><br></div><div>Am I doing something wrong?</div><div><br></div><div>Thanks in advance </div><div><br></div><div>Tiago</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="content-type" content="text/html; charset=utf-8">