On my Ubuntu machine, I have a version of Qt installed. This was installed a while ago, and I cannot remember how I installed it. But if I run apt list --installed from the command line, there are several packages listed related to qt, such as qtcreator/xenial,now 3.5.1+dfsg-2ubuntu2 amd64, qtcreator-data/xenial,xenial,now 3.5.1+dfsg-2ubuntu2 all, qttools5-dev-tools/xenial-updates,now 5.5.1-3ubuntu0.1 amd64, etc.
I now want to update my version of Qt. So, I visited the Qt website and downloaded the latest version, which cam as a .run file. Running this file installed the new version of Qt into a directory of my choice. This directory is /home/John/Libraries/Qt-5.9. I didn't do anything after running the .run file, but I was able to load the new version of Qt Creator by executing one of the binary files.
However, if I run qmake --version from the command line, it prints out Using Qt version 5.5.1 in /usr/lib/x86_64-linux-gnu. Therefore, it seems that my system is still using the old version of Qt by default.
How can I ensure that my system uses the new version when linking with other projets?