This error occurs because you are using a project that was compiled in one version of Qt. The main reason for this is that Qt uses the moc tool, which creates glue code for processing signal slots and other things.
Moc does this by analyzing header files to find definitions like Q_OBJECT, signal :, slot :, etc.
This code is fully tied to the version of Qt that was used to create this code. In some cases, this code is completely incompatible even for the same version of the Qt library that was configured with a different set of options.
This case is true even for some changes in .pro, for example, using CONFIG + = no_keywords causes moc to generate different glue code, allowing Qt to work with other libraries, such as boost, that provide signal slot mechanisms using the same keywords as and Qt.
So, in short, whenever you need to compile a Qt project with another Qt library, make sure you do the following: 1. run: make distclean 2. run: qmake 3. run: make
This will always give you a clean build tree.
source share