[Development] Qt LTS & C++11 plans (CopperSpice)

charleyb123 . charleyb123 at gmail.com
Wed Jul 1 21:59:33 CEST 2015


>
> > For example, with moc removed we support template classes that inherit> from QObject.
>
> Wow. I would (almost) kill for having that feature in Qt!
>
> You can work around it quite easily. What doesn’t work is adding new
> signals / slots inside a template class. So just add a base class declaring
> these signals/slots, and make your template class inherits from it.
>
> Unless you wan’t to use the template class as signal/slots arguments, this
> works fine.
>
> Regards,
>
> Julien
>

+1.

I do that a lot:

  QObject <= MyClass <= MyTemplate <= MyClassDerived

--charley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20150701/cc3a6225/attachment.html>


More information about the Development mailing list