[PyQt] Question about QPyDesignerCustomWidgetCollectionPlugin
Tiago Coutinho
coutinhotiago at gmail.com
Tue Feb 1 08:36:48 GMT 2011
Hello all,
Does anyone have an example on how to code the
QtDesigner.QtDesigner.QPyDesignerCustomWidgetCollectionPlugin?
I am using Qt 4.7.0 and PyQt 4.7.4.
I have coded something like:
class MyCustomWidget1Plugin(QPyDesignerCustomWidgetPlugin):
def createWidget(self, parent):
...
class MyCustomWidget2Plugin(QPyDesignerCustomWidgetPlugin):
def createWidget(self, parent):
...
class
MyCustomWidgetCollectionPlugin(QPyDesignerCustomWidgetCollectionPlugin):
def __init__(self, parent=None):
QPyDesignerCustomWidgetCollectionPlugin.__init__(parent)
self._plugins =
[ MyCustomWidget1Plugin(self), MyCustomWidget2Plugin(self) ]
print "CREATED"
def customWidgets(self):
return self._plugins
I see both my custom widgets in the designer without a problem but
the MyCustomWidgetCollectionPlugin class never gets instanciated.
Am I doing something wrong?
Thanks in advance
Tiago
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110201/5b2e8f12/attachment-0001.html>
More information about the PyQt
mailing list