This library is a collection of utilities for Qt's Model/View framework.
- Role Mask Proxy Model: A proxy that will act as a mask on top of the source model to intercept data.
- Insert Proxy Model: A proxy to add an extra row, column or both to allow users to insert new sections with a familiar interface.
- Root Index Proxy Model: A proxy to only show the portion of the model that are branches to a particular index.
- Model Serialisation: Implements a general method to serialise
QAbstractItemModel
based models to various common formats. - Generic Model: A convenience model for generic use implementing the full
QAbstractItemModel
interface. Transpose Proxy Model: A proxy model to transpose the original model.Now part of Qt:QTransposeProxyModel
If your system is compatible with one of the main platforms listed below you can download the pre-compiled dinamically linked library from the releases page.
This library uses CMake as build system and allows usage both using static and dynamic linking as well as customising what parts of the library you want to build. See INSTALL for detailed build instructions.
Once you installed/unpacked your library in a directory (e.g. path/to/QtModelUtilities
)
- CMake: add
path/to/QtModelUtilities
toCMAKE_PREFIX_PATH
, then you can usefind_package(QtModelUtilities)
/target_link_libraries(MyApp PRIVATE QtModelUtilities::QtModelUtilities)
in your CMakeLists. - qmake: add
INCLUDEPATH += path/to/QtModelUtilities/include
andLIBS += -Lpath/to/QtModelUtilities/lib/ -QtModelUtilities
to your .pro file - Visual Studio: Right click on your project and select properties
- under Configuration Properties->Linker->Additional Library Directories add
path/to/QtModelUtilities/lib
- under Configuration Properties->Linker->Input->Additional Dependencies add
QtModelUtilities.lib
- under C/C++->Additional Include Directories add
path/to/QtModelUtilities/include
- under Configuration Properties->Linker->Additional Library Directories add
The library should be compatible with all platform supported by Qt, the CI will build, test and deploy the following configurations:
- Windows MSVC 2019 64bit Qt 5.15
- Windows MSVC 2019 64bit Qt 6.5
- Windows MinGW 8.1 64bit Qt 5.15
- Windows MinGW 8.1 64bit Qt 6.5
- Ubuntu g++ 64bit Qt 5.15
- Ubuntu g++ 64bit Qt 6.5
- Mac OS X Clang 64bit Qt 5.15
- Mac OS X Clang 64bit Qt 6.5
A reduced suite of tests, to ensure compatibility, is also run on:
- Ubuntu g++ 64bit Qt 6.2
- Ubuntu g++ 64bit Qt 5.12
- Ubuntu g++ 64bit Qt 5.9
See the examples folder
Docs can, alternatively, be built using Doxygen and the DoxygenConfig.doxyfile file in the Docs foldes.
- Qt 5.1 or later
- C++11
- Doxygen (optional to build documentation)
Contributions are welcome. You can either open a ticket or submit a pull request on the project's GitHub page.
Contributed code should adhere to the Qt Coding Style Guide.