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

Bernhard private at bernhard-lindner.de
Thu Jul 2 23:00:43 CEST 2015


Unfortunately adding signals of the template’s type is exactly what I would have needed several times. In that case there is no clean solution. I once added QVariant based signals as a workaround but that was ridiculous. In modern times having powerful C++ generic programming features it is a shame that QObject doesn’t support this. IMHO this is one of the features (like C++11) that need to be introduced in Qt as fast as possible if it should not appear old-fashioned soon.

 

-- 

Kind Regards

Bernhard Lindner

 

Von: development-bounces+private=bernhard-lindner.de at qt-project.org [mailto:development-bounces+private=bernhard-lindner.de at qt-project.org] Im Auftrag von Julien Blanc
Gesendet: Mittwoch, 1. Juli 2015 09:16
An: development at qt-project.org
Betreff: Re: [Development] Qt LTS & C++11 plans (CopperSpice)

 

Le mardi 30 juin 2015 à 22:37 +0200, Bernhard a écrit : 

 
> 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 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20150702/4344e2da/attachment.html>


More information about the Development mailing list