[PyKDE] How to inherit from QWidget

Jim Bublitz jbublitz at nwinternet.com
Tue Jan 21 00:25:01 GMT 2003

On 20-Jan-03 Paul F. Kunz wrote:
>>>>>> On Mon, 20 Jan 2003 13:02:06 -0800 (PST), Jim Bublitz
>>>>>> <jbublitz at nwinternet.com> said:
>> That will also add a bunch of sipqt*.h files to the directory
>> where
>> your sip-generated C++ code is located.
>    It also generated sipsihippoProxysihippo.h (sihippo is the
> name of
> my module.  Do I need to moc that file and compile the generated
> file?

Yes, it should have a Q_OBJECT line in it. You can steal the code
to do it from PyQt/qt/Makefile. If you build the way PyQt and PyKDE
do, it all happens automatically and I'm not really sure if
tmake/qmake generate that or if it's in the build script. It hasn't
broken yet, so I haven't worried about it.

Older versions of PyQt/PyKDE (using autoconf) are set up to allow
sip to generate the Makefile (-m switch), and include code to
insert this in the Makefile. Using -m with qmake, the template for
the Makefile (see the end of qtmod.sip, for example) doesn't need
to worry about this any more.


More information about the PyQt mailing list