[PyKDE] KXMLGUIFactory.container()
Gordon Tyler
gordon at doxxx.net
Sun Apr 13 21:45:00 BST 2003
On April 13, 2003 05:31 am, Phil Thompson wrote:
> This is handled by providing SIP with %ConvertToSubClass code. PyQt
> provides the code for all classes that are part of Qt. PyKDE should do the
> same for the relevant classes of KDE.
I don't find any use of %ConvertToSubClassCode in PyKDE.
> In this case, if KXMLGUIFactory.container() is returning a QPopupMenu then
> the existing PyQt support should be enough as only Qt widgets are involved.
> If, instead, it is returning a KDE specific sub-class of QPopupMenu, and
> PyKDE doesn't provide appropriate %ConvertToSubClass code then it will
> return the base type, ie. QWidget.
KXMLGUIFactory.container() looks like it can return instances of KMainWindow,
KMenuBar, KPopupMenu, KToolBar, or KStatusBar. It gets them from a DOM-like
structure created and owned by an instance of KXMLGUIBuilder.
I've been looking at the use of %ConvertToSubClassCode in PyQt and I'm
struggling to understand how it works. Could you give an example for this
situation?
> Factory functions should also have the SIP /Factory/ tag.
What determines whether a function is a factory function?
Thanks,
Gordon
More information about the PyQt
mailing list