[PyKDE] Wrapper for QWidgetFactory

Phil Thompson phil at riverbankcomputing.co.uk
Thu Sep 2 15:17:11 BST 2004


On Monday 30 August 2004 10:46 pm, Gustavo Barbieri wrote:
> Hello,
>
> Tried of connecting slots manually I've coded a wrapper [1] for
> QWidgetFactory that given a class it do all the connections and return
> the interface.
>
> There is a demo [2], which was my (only) test case...
>
> Could you comment on that? There is any possibility to integrate that to
> PyQT?
>
> [1] http://gsbarbieri.sytes.net/~gustavo/qt_ui_loader.py
> [2] http://gsbarbieri.sytes.net/~gustavo/pyqt_xml-ui_demo.tar.bz2

Although I understand the reasoning behind this, I don't want to include it in 
PyQt. Having to parse the .ui file for a second time is a bit too heavy 
handed (although it's the only way to handle it with the current 
implementation of QWidgetFactory).

I'd suggest you put it up on the Wiki at 
http://www.diotavelli.net/PyQtWiki/SampleCode.

Another approach to the problem (which has been in the back of my mind for a 
while) is to re-implement pyuic as a Python module (or maybe as a SIPed C++ 
library) which would do the job of both the current pyuic executable and 
QWidgetFactory. And it would be easier to maintain.

Phil




More information about the PyQt mailing list