[Qt-interest] How to write CMakeLists.txt when Q_OBJECT inxxx.cpp file
Scott Aron Bloom
Scott.Bloom at onshorecs.com
Sat Jul 31 19:11:54 CEST 2010
-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Guido Seifert
Sent: Saturday, July 31, 2010 9:29 AM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] How to write CMakeLists.txt when Q_OBJECT
inxxx.cpp file
> Its quite common, for "hidden" simple classes to have them fully
declared
> in a CPP file.
>
> The usual solution is to include the generated moc_XXXX.cpp file at
the
> end of the CPP file
Ah thanks, I think I have seen this once or twice. Never knew what the
advantage was and somehow disliked the moc_* includes.
Hidden classes yes, but I never deemed a class, which inherits QObject
and needs Q_OBJECT simple. :-)
Guido
--
For example, I have done this with QThread derived classes, as well as
simple overridden QLineEdit type functions (where in the particular
usage it remove the carriage return from being allowed)
Scott
More information about the Qt-interest-old
mailing list