[Qt-interest] Basic question on applying QObject principles to Interfaces

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Wed May 5 07:17:36 CEST 2010


>
> It's not a problem. In fact, overriding signals is a bad idea. If a given
> signal is used by many subclasses and has the same meaning, put it in the base
> class.

Well my concrete use-case for putting signal info in an interface
class is while implementing plugins. If my plugin emits signals, then
the interface class is the only place i can put this info since the
actual implementation classes are "hidden" from a user.

>
> Though I must say, this is not a real "interface" use in the pure sense of the
> word. An interface would not derive from QObject and it would be used in
> multiple-inheritance. That would by necessity mean that the interface contains
> no signals or slots.

Agreed. But for plugin interface there's no other way to go about doing it.

Thanks,
-mandeep

>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>  Senior Product Manager - Nokia, Qt Development Frameworks
>      PGP/GPG: 0x6EF45358; fingerprint:
>      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>




More information about the Qt-interest-old mailing list