[Interest] Strange QvariantList/QVariant problem

Guido Seifert wargand at gmx.de
Mon Nov 25 17:38:51 CET 2013


 
> Note that QVariantList is simply a QList<QVariant>. You adding a 
> QVariantList to another QVariantList perfectly fits the function 
> signature of QList::append(const QList<T>& value).

Yep, noticed that.

> In order to make it 
> resolve to QList::append(const T& value), your QVariantList would first 
> have to be implicitly casted to a QVariant to fit the signature. AFAIK, 
> C++ will always prefer not to do an implicit cast if that isn't needed 
> to resolve the function call.

Yep. 

Correct order would have been: First assistant than qt-interest. Not the 
other way round. ;-)

Guido



More information about the Interest mailing list