[PyKDE] overloading events with qt designer and pyqt

Frank Stüss frank.stuess at stuess.de
Tue Jun 28 19:50:25 BST 2005


> I'm not sure if that's really what you want, but if you'd like to use
> qt-designer and hand-coded additions at the same time, you can create
> your UI / widgets using qt-designer and then subclassing that UI in
> another file and overload the (paint)event. That way you can still
> change the UI without having to re-merge your changes everytime you
> recompile the .ui files.

Thanks. Got it. But what if i don't want to overload the overall paintEvent of 
the UI but only the one of a part of it, eg. a QFrame or a QHbox? Shure I 
would subclass QFrame and overload the event but how can I put it into the 
'designed' code, since my UI still uses QFrame and not the subclass of it.

I like to do some simple drawLines on a QFrame not using any extension 
packages, only what is shipped with QT and pyqt. 

Thanks again for any help.





More information about the PyQt mailing list