Using Qt 5.8.0 on Win 7 / MSVC2015x64bit;
I had the same issue and I found a way to fix it, even if its not the smartest:
1) Open your projectname.pro file
2) Between
QT += core gui
and
greaterThan(QT_MAJOR_VERSION, X): QT += widgets
paste QT += widgets
so this part looks kinda like this:
...
QT += core gui
QT += widgets
greaterThan(QT_MAJOR...
Save and close the .pro file and wait for Qt to automatic read the
file-changes and updating itself.
(If you have deaktivated this try restart Qt)
Aswell as this - replacing the "X" at greaterThan(QT_MAJOR_VERSION, X): QT += widgets
with the pre-version's number works fine for me. (X = your_major_version - 1
)
(In case using Qt 5.x place a 4 instead of 5, using Qt 3.x replace 3 with 2 and so on...)
I dont know if this also works for other platforms...
I hope i could help at least 1 person who has the same issue. ;)
Greetings Zitro