Qt5 on FreeBSD

For a reason FreeBSD doesn’t support Qt5 build tools out of box. There are a few problems that have to be solved before you can run qmake && make to build a project. Firstly, my default setup didn’t have QMAKESPEC specified, add this line to your .bashrc/.zshrc:

export QMAKESPEC=freebsd-g++

Also add this line to specify Qt5 theme:

export QT_QPA_PLATFORMTHEME=qt5ct

If you installed qt with qt5-core and qt5-qmake, the installed packages are in:

/usr/local/lib/qt5/bin

but this path is not in standard $PATH, so you need to append it:

PATH=$PATH:/usr/local/lib/qt5/bin
[Total: 0    Average: 0/5]