I found a solution for this, and it is as simple as specifying the -prefix option to configure.
For qmake on the command line, you simply add the PREFIX = parameter:
qmake PREFIX=/usr/local
There are two ways to do this in QtCreator. First, you can modify your .pro file to include the explicit definition of the PREFIX variable. However, this is not recommended, as the prefix is ​​preferred for each user, and it is preferable to distribute common project files. The best way to do this is in your own project settings. Just go to the assembly configuration that you are using, expand the qmake options and add PREFIX = to the additional arguments.
source share