Personally, I needed to do something else.
I renamed my "Form" class to "MainWindow", and I had to go into the "build-yourproject ...- Debug \ ui_mainwindow.h" directory and replace each "form" with "MainWindow" (Ctrl + f), and then he worked.
EDIT: This is a manual solution that modifies the file that is downloaded during each build, so this change is automatically lost. The correct solution is to enter Qt Creator and in the upper right corner under the name "Object", you must have the name of your class, this is what you need to change.
source share