Compiling Qt apps - switch between Qt4 and qt5

Hello. Since is possible to have both packages (Qt4-dev and Qt5-dev) installed; how can I switch between them when compiling? In my case, qmake is “stuck” to Qt5, but for some apps I need to switch to Qt4.

Thank you!

I don’t know the specific solution for your problem. Maybe as a workaround, you could just move the Qt5_devel package out of /system/packages and move Qt4_devel in?


Yes, removing the development packages is probably the only way, unless some tools are made available with a suffix (qmake4 or something like that?)

How is this handled in linux distros usually?

Hello. Apparently, in Linux there are the ‘qtchooser’ command:

Another way, is using a environment variable:

I’m not sure if in Haiku we could set in the same way.