I never have a' Original number" as the strings come from file names and
another app.
QCollator is the ticket.
Cheers,
frank
On 15/11/18 4:14 AM, Shawn Rutledge wrote:
On 14 Nov 2018, at 03:28, Frank Rueter | OHUfx <fr...@ohufx.com> wrote:
Hi,
I need to use the QSortFilterProxyModel to sort strings with numbers in them,
i.e. perform natural sorting.
Another idea is to add a different role to your model, have data() return the
original number (int or qreal or whatever) in the variant for that role, and
call setSortRole() to tell QSFPM which role to use.
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest