Download QT Offline installers here: https://www.qt.io/offline-installers
Click 5.12.x Offline Installers
Select QT for a Linux host
The download will result in a .run file. A .run file is the same as an executable and can be launched using the ./<run_file> syntax.
When launching the installation file QT will ask you to use your credentials. Apply them or create a user account.
Next, after logging in, the installation script will ask you to confirm two things:
confirm it's not to be used in a company configuration
confirm you have read the terms and conditions issued by QT
Press twice Next : you will be asked to point to the installation directory. Choose the location you want (create if necessary).
Next, it will ask what to install. By default the Developer and Designer Tools checkbox is selected.
I also selected the following items from the Qt 5.12.12 section:
Desktop gcc 64-bit to be able to compile your application for a desktop environment
Sources to be able to jump to source code when developing a QT application
Next you have to agree with the license agreement
Finally, the setup is ready and installation can start. It will take some minutes to finish.
If all goes well there should be a new item added in the Development entry in the Linux Mint 21 start menu.
When you launch QT you will be presented by the Example pages. There's tons of useful examples that can be launched and used as an example.
When you press the Projects tab, you can create applications yourself.
When I tried to create my first application I got an error during the build process with the message "cannot find -lGL". It apparently can't fine a graphics library.
No idea why an initial project already fails to build but the solution was luckily easy: install the missing library using the installation command
sudo apt install libglu1-mesa-dev.
After installing this package and rebuilding the initial application, all went fine.