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
qcustomplot
files based on the version in the OpenHKL repo. - Replaced some signals and slots which were obsolete in Qt6.
- Replaced
QRegExp
withQRegularExpression
andQRegularExpressionMatch
, sinceQRegExp
is deprecated in Qt6. - Replaced
QStringRef
withQString
, sinceQStringRef
is deprecated in Qt6. - Corrected the comparison of
QStringView
withstd::string
:QStringView
must 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
QListToQSet
to convert aQList
to aQSet
; the direct conversion is not allowed in Qt6. - Discarded
QMetaType::registerComparators
which 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.dll
andlibGLESv2.dll
are not part of the Qt6 distribution; instead,Qt6OpenGL.dll
,Qt6OpenGLWidgets.dll
andopengl32sw.dll
must 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
modified
signal 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