Migration to Qt6
The following changes were applied to adapt the GUI to Qt6:
- Adapted GitLab-CI script to Qt6.
- Adapted CMake scripts to Qt6
- Updated
qcustomplotfiles based on the version in the OpenHKL repo. - Replaced some signals and slots which were obsolete in Qt6.
- Replaced
QRegExpwithQRegularExpressionandQRegularExpressionMatch, sinceQRegExpis deprecated in Qt6. - Replaced
QStringRefwithQString, sinceQStringRefis deprecated in Qt6. - Corrected the comparison of
QStringViewwithstd::string:QStringViewmust be converted to a string before being compared to astd::string. - Added proper include statements to avoid incomplete-type error.
- Used explicit type instead of
auto, otherwise the compiler could not determine the type on its own. - Added an auxiliary function
QListToQSetto convert aQListto aQSet; the direct conversion is not allowed in Qt6. - Discarded
QMetaType::registerComparatorswhich is removed in Qt6: In Qt 6, QMetaType::registerComparators have been removed. The metatype system will instead know about those automatically. See https://www.qt.io/blog/whats-new-in-qmetatype-qvariant. -
Windows installer: The libraries
libEGL.dllandlibGLESv2.dllare not part of the Qt6 distribution; instead,Qt6OpenGL.dll,Qt6OpenGLWidgets.dllandopengl32sw.dllmust be included in the Windows installer. See further https://doc.qt.io/qt-6/windows-deployment.html and https://doc.qt.io/qt-6/opengl-changes-qt6.html. - The emission of the
modifiedsignal is modified inProjectDocument::saveProjectFile, since the original mechanism was logically incorrect.
NOTE:
The CMake command to find Qt6 include files and libraries is the following:
OPT_DIR="$HOME/.local/opt"
QT_CMAKE_DIR="$OPT_DIR/Qt/6.2.3/gcc_64/lib/cmake"
cmake -S . -B build -DCMAKE_PREFIX_PATH="$OPT_DIR;$QT_CMAKE_DIR"
See further:
https://doc.qt.io/qt-6/cmake-commands-qtcore.html
https://doc.qt.io/qt-6/qt-add-resources.html
Closes issue #204 (closed)
Edited by Ammar Nejati