SortFilterProxyModel icon indicating copy to clipboard operation
SortFilterProxyModel copied to clipboard

Qt6 removed QRegExp

Open crziter opened this issue 5 years ago • 4 comments

I were trying to use this project in a Qt6 based project but failed to compile due to missing QRegExp in Qt6.

crziter avatar Dec 22 '20 08:12 crziter

If you add find_package(Qt6 REQUIRED Core Qml Core5Compat )

and target_include_directories(SortFilterProxyModel PUBLIC ${CMAKE_CURRENT_LIST_DIR} $<TARGET_PROPERTY:Qt6::Core,INTERFACE_INCLUDE_DIRECTORIES> $<TARGET_PROPERTY:Qt6::Qml,INTERFACE_INCLUDE_DIRECTORIES> $<TARGET_PROPERTY:Qt6::Core5Compat,INTERFACE_INCLUDE_DIRECTORIES> Qt6::Core5Compat ) you will get around that. But other errors will show up

maxwell130631 avatar Jan 15 '21 15:01 maxwell130631

Is there a working Qt 6.6 port somewhere? i tried these latest commits, but they crashed on the setSourceModel function saying that the "called object is not of the correct type". But I did the exact sample code in the readme.

metalMajor avatar Dec 03 '23 21:12 metalMajor

Is there a working Qt 6.6 port somewhere? i tried these latest commits, but they crashed on the setSourceModel function saying that the "called object is not of the correct type". But I did the exact sample code in the readme.

There are a few forks with this feature, I haven't tried those yet, however this could be the most updated: https://github.com/oKcerG/SortFilterProxyModel/compare/master...valaczka:SortFilterProxyModel:master

Daguerreo avatar Dec 04 '23 12:12 Daguerreo

ok thanks for my use case, it's pure qml so I found this blog, and that seems much simpler to filter a simple qml list:

https://martin.rpdev.net/2019/01/15/using-delegatemodel-in-qml-for-sorting-and-filtering.html

metalMajor avatar Dec 04 '23 16:12 metalMajor