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...@qt-project.org 
[mailto:development-bounces+private=bernhard-lindner...@qt-project.org] Im 
Auftrag von Julien Blanc
Gesendet: Mittwoch, 1. Juli 2015 09:16
An: development@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 

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to