I'm trying to migrate a simple project to Qt 5. The project was originally written for Qt 4, and it compiles fine there.
When compiling with Qt 5, however, I'm getting this error:
error: C1083: Cannot open include file: 'ui_mainwindow.h': No such file or directory
Now I know that ui_mainwindow.h should be auto-generated when compiling, and I've checked and it is not being generated when compiling with Qt 5.
Note
This happens on a newly created project as well.
Steps to reproduce:
What worked for me in the end was deleting both the Debug and Release build folders. What is strange is that I hadn't copied them initially, so I have no idea why it helped deleting them after they were first created.
But if anyone has this problem, try deleting the Debug and Release folders, as well as the .user file. This should force Qt Creator to reconfigure your project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With