Compilation errors after deleting/editing UI widgets. Tried everything
-
First of all, I tried everything that helped others with the same problem. Deleting the build directory, cleaning the build and running qmake, disabling Shadow-Builds, and so on.. But the moc_mainwindow.cpp doesn't cease to contain references to non-existent widgets.
the one I deleted:
C:\Users\sophie\Documents\Bestellungen\debug\moc_mainwindow.cpp:112: Fehler: undefined reference to `MainWindow::on_checkBox_toggled(bool)'
the one I renamed:
C:\Users\sophie\Documents\Bestellungen\debug\moc_mainwindow.cpp:113: Fehler: undefined reference to `MainWindow::on_pushButton_clicked()'
any idea? :(
-
@SnuggleKat Do you maybe still have connections for these slots somewhere?
-
hi @SnuggleKat
please do not rely on the automatic connect by name method that Qt and QtDesigner provide.
That will and does, like you just now detected, break very easily.I recommend connecting all your signals to slots by hand, and using the new Qt5 Syntax
https://wiki.qt.io/New_Signal_Slot_Syntaxdelete your build folder and rerun qmake, it will fix your issue.
-
@SnuggleKat No problem, happens sometimes :-)