There was an issue when running ./Slicer --launch /home/xxx/Qt5.14.2/Tools/QtCreator/bin/qtcreator on Ubuntu 18.04.

I successfully built Slicer version 5.7.0-2024-11-08 on Ubuntu 18.04 following the instructions in the Slicer documentation. However, when I try to debug using Qt, I run into an issue. I launched Qt Creator using the command:
./Slicer --launch /home/xxx/Qt5.14.2/Tools/QtCreator/bin/qtcreator

and received this error:
Cannot mix incompatible Qt library (version 0x50e02) with this library (version 0x50e01)
error: [/home/xxx/Qt5.14.2/Tools/QtCreator/bin/qtcreator] exit abnormally - Report the problem.

When building, I used the following cmake command:
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQt5_DIR=/home/xxx/Qt5.14.2/5.14.2/gcc_64/lib/cmake/Qt5 …/Slicer

Could you advise on how to resolve this issue?

I don’t think this would be something specific to Slicer, but it seems to be a quite widely reported problem on Linux with Qt. Please try some of the suggestions that fixed it for others, for example:

I think I may have identified the problem: on Ubuntu 18.04, I installed Qt 5.14.2 and ran the cmake command -DQt5_DIR=/home/xxx/Qt5.14.2/5.14.2/gcc_64/lib/cmake/Qt5. This makes Slicer pull the required libraries from this path, where all the libraries are version 5.14.2. However, when launching Qt Creator using ./Slicer --launch /home/xxx/Qt5.14.2/Tools/QtCreator/bin/qtcreator, the libraries used by Qt Creator are not from /home/xxx/Qt5.14.2/5.14.2/gcc_64/lib but instead from /home/xxx/Qt5.14.2/Tools/QtCreator/lib/Qt/lib. The libraries in this path are linked to version 5.14.1