You may have different moc binaries and different qmake binaries. qmake creates rules for compilation using the moc tool that is related to its own (qmake) binary. It expects it to be in the same path. Thanks to that by changing the qmake tool you run, you may change the Qt installation that will be used to build the project. I suspect that if you move your qmake to /usr/bin, then it will use /usr/bin/moc.
Here is how moc path is defined:
isEmpty(QMAKE_MOC) {
win32:QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
else:QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
}
isEmpty(QMAKE_MOC) {
win32:QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
else:QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
}
To copy to clipboard, switch view to plain text mode
Notice that you may override it by defining QMAKE_MOC.
Bookmarks