QProxyModel/SortModel display items without children ?
- 
Hey Say I have a item model with this hierarchy: >item >item2 >item3 >item4Which model should I use to display it as item item2 item3 item4So no children, all linearly top to bottom. As well as then display only ones matching specific string... 
 Would a QSortFilterProxyModel work for both of my needs or do I have to daisy chain 2 together? QProxyModel + SortFilter?Regards 
 Dariusz
- 
@Dariusz said in QProxyModel/SortModel display items without children ?: How on earth do I get it Open a developer command prompt with cmake and git and run: 
 (This is for Windows on MSVC, for MinGW replaceNMakewithMinGW. for linux/mac just remove-G"NMake Makefiles")git clone https://invent.kde.org/frameworks/extra-cmake-modules.git cd extra-cmake-modules mkdir build cd build cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX="../../KDEAPI" ../ cmake --build . --target install cd ../../ git clone https://invent.kde.org/frameworks/kitemmodels.git cd kitemmodels mkdir build cd build cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_PREFIX_PATH="../../KDEAPI" -DCMAKE_INSTALL_PREFIX="../../KDEAPI" ../ cmake --build . --target install cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_PREFIX_PATH="../../KDEAPI" -DCMAKE_INSTALL_PREFIX="../../KDEAPI" ../ cmake --build . --target install cd ../../ rmdir extra-cmake-modules /s /q rmdir kitemmodels /s /qNow just add the path to the newly created KDEAPIfolder to theCMAKE_PREFIX_PATHof your project in the project configuration
- 
Which model should I use to display it as KDescendantsProxyModelfromKItemModelshttps://api.kde.org/frameworks/kitemmodels/html/classKDescendantsProxyModel.htmldo I have to daisy chain 2 together? QProxyModel + SortFilter? Chain away! 
- 
Which model should I use to display it as KDescendantsProxyModelfromKItemModelshttps://api.kde.org/frameworks/kitemmodels/html/classKDescendantsProxyModel.htmldo I have to daisy chain 2 together? QProxyModel + SortFilter? Chain away! 
- 
@Dariusz said in QProxyModel/SortModel display items without children ?: How on earth do I get it Open a developer command prompt with cmake and git and run: 
 (This is for Windows on MSVC, for MinGW replaceNMakewithMinGW. for linux/mac just remove-G"NMake Makefiles")git clone https://invent.kde.org/frameworks/extra-cmake-modules.git cd extra-cmake-modules mkdir build cd build cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX="../../KDEAPI" ../ cmake --build . --target install cd ../../ git clone https://invent.kde.org/frameworks/kitemmodels.git cd kitemmodels mkdir build cd build cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_PREFIX_PATH="../../KDEAPI" -DCMAKE_INSTALL_PREFIX="../../KDEAPI" ../ cmake --build . --target install cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_PREFIX_PATH="../../KDEAPI" -DCMAKE_INSTALL_PREFIX="../../KDEAPI" ../ cmake --build . --target install cd ../../ rmdir extra-cmake-modules /s /q rmdir kitemmodels /s /qNow just add the path to the newly created KDEAPIfolder to theCMAKE_PREFIX_PATHof your project in the project configuration
- 
@Dariusz said in QProxyModel/SortModel display items without children ?: How on earth do I get it Open a developer command prompt with cmake and git and run: 
 (This is for Windows on MSVC, for MinGW replaceNMakewithMinGW. for linux/mac just remove-G"NMake Makefiles")git clone https://invent.kde.org/frameworks/extra-cmake-modules.git cd extra-cmake-modules mkdir build cd build cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX="../../KDEAPI" ../ cmake --build . --target install cd ../../ git clone https://invent.kde.org/frameworks/kitemmodels.git cd kitemmodels mkdir build cd build cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_PREFIX_PATH="../../KDEAPI" -DCMAKE_INSTALL_PREFIX="../../KDEAPI" ../ cmake --build . --target install cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_PREFIX_PATH="../../KDEAPI" -DCMAKE_INSTALL_PREFIX="../../KDEAPI" ../ cmake --build . --target install cd ../../ rmdir extra-cmake-modules /s /q rmdir kitemmodels /s /qNow just add the path to the newly created KDEAPIfolder to theCMAKE_PREFIX_PATHof your project in the project configuration@VRonin Awesome thanks! I was able tho to just grab the 2 files and use them directly so yay! This tree model is epic. It does 90% of what I wanted ! Now I just gotta figure out how to hide parent/groups, so I only see items, but that should be fine, super awesome, thanks! Edit1. using sort filter model later to decide if I want to show parents/etc worked just fine, yay! 
