On segunda-feira, 14 de maio de 2012 17.49.03, Till Oliver Knoll wrote:
> I prefer:
>
> class Foo : public QObject {
>   Q_OBJECT
> public:
>   FOO_API Foo(); // c'tor
>   FOO_API virtual ~Foo();

That's a bad idea. That causes those problems of missing virtual table and
meta object because the FOO_API was not applied to the Q_OBJECT internals nor
the class.

If you try to derive from this class or use qobject_cast, you'll get linker
errors.

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to