> On 18 Sep 2020, at 10:28, Albert Astals Cid <[email protected]> 
> wrote:
> 
> El divendres, 18 de setembre de 2020, a les 10:22:16 CEST, Lars Knoll va 
> escriure:
>> Sorting and equality are two different things. QVariant has never supported
>> a lessThan operator.
> 
> Yes, it has
> 
> https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/kernel/qvariant.h?h=5.15#n467

You’re right. I thought it didn’t support that.

What is it you need? Just some total ordering of variants? The method you 
mentioned in QAbstractItemModel also only does ordering for some types, 
otherwise falling back to strings.

Cheers,
Lars

> 
> Cheers,
>  Albert
> 
>> Cheers,
>> Lars
>> 
>> 
>> Cheers,
>> Albert
>> 
>> --
>> Albert Astals Cid |
>> [email protected]<mailto:[email protected]> | Senior
>> Software Engineer
> Klarälvdalens Datakonsult AB, a KDAB Group company
>> Tel: Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
>> KDAB - The Qt, C++ and OpenGL Experts
>> 
>> _______________________________________________
>> Development mailing list
>> [email protected]<mailto:[email protected]>
>> https://lists.qt-project.org/listinfo/development
>> 
> 
> 
> -- 
> Albert Astals Cid | [email protected] | Senior Software Engineer
> Klarälvdalens Datakonsult AB, a KDAB Group company
> Tel: Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
> KDAB - The Qt, C++ and OpenGL Experts
> 

_______________________________________________
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development

Reply via email to