(Clément may have more/better to add but in the meantime: )
As far as I am aware QT5.12 isn't needed to
compile Therapist on linux but rather only to run the precompiled release.
To compile it first acquire the source code. Either (assuming git is installed)
git clone https://github.com/Dwarf-Therapist/Dwarf-Therapist.git
Or from the releases page
https://github.com/Dwarf-Therapist/Dwarf-Therapist/releases download the tar.gz and then extract it.
Once the source code is in a folder named (for example) Dwarf-Therapist then it can be built/compiled. Make a new folder alongside the former and call it (say) Dwarf-Therapist-build. Open a terminal in the new folder (or cd there if you are doing it from the command line) then
cmake ../Dwarf-Therapist
ln -s ../Dwarf-Therapist/share .
make -j$(nproc)
./dwarftherapist
make install
The second and final lines are not strictly needed since DT should download the correct memory layouts on load, and can be run manually without installation, respectively.
Then it is probably necessary (depending on distro) to deal with ptrace permissions. There is a good summary here:
https://github.com/Dwarf-Therapist/Dwarf-Therapist/blob/master/dist/ptrace_scope/README.md.
Personally however I just use the cmake and make commands, move the binary to my df folder and then
sudo setcap cap_sys_ptrace=ep /path/to/dwarftherapist
Then I run it manually from the terminal using ./dwarftherapist
But each to their own.