I was writing slot function for a button called “pushButton” that I realised the name of the button should actually be “pushButton_AreYouCompany” so I deleted than function and renamed the button and wrote another slot.
Now I get error in this function which is written by Qt
void CompleteUserInfoWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<CompleteUserInfoWindow *>(_o);
(void)_t;
switch (_id) {
case 0: _t->on_pushButton_Done_clicked(); break;
case 1: _t->on_pushButton_clicked(); break;
case 2: _t->on_pushButton_AreYouCompany_clicked(); break;
default: ;
}
}
(void)_a;
}
enter image description here
Here is compile output:
`
14:53:59: Running steps for project LinkedIn…
14:53:59: Configuration unchanged, skipping qmake step.
14:53:59: Starting: “C:QtToolsmingw1120_64binmingw32-make.exe” -j2
C:/Qt/Tools/mingw1120_64/bin/mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory ‘D:/Linked In/build-LinkedIn-Desktop_Qt_6_6_2_MinGW_64_bit-Profile’
g++ -Wl,-subsystem,windows -mthreads -o releaseLinkedIn.exe @releaseobject_script.LinkedIn.Release C:Qt6.6.2mingw_64liblibQt6Widgets.a C:Qt6.6.2mingw_64liblibQt6Gui.a C:Qt6.6.2mingw_64liblibQt6Sql.a C:Qt6.6.2mingw_64liblibQt6Core.a -lmingw32 C:Qt6.6.2mingw_64liblibQt6EntryPoint.a -lshell32
C:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: release/moc_completeuserinfowindow.o: in function `CompleteUserInfoWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)’:
D:Linked Inbuild-LinkedIn-Desktop_Qt_6_6_2_MinGW_64_bit-Profile/release/moc_completeuserinfowindow.cpp:128: undefined reference to `CompleteUserInfoWindow::on_pushButton_clicked()’
C:/Qt/Tools/mingw1120_64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:Linked Inbuild-LinkedIn-Desktop_Qt_6_6_2_MinGW_64_bit-Profile/release/moc_completeuserinfowindow.cpp:128: undefined reference to `CompleteUserInfoWindow::on_pushButton_clicked()’
collect2.exe: error: ld returned 1 exit status
mingw32-make[1]: *** [Makefile.Release:153: release/LinkedIn.exe] Error 1
mingw32-make[1]: Leaving directory ‘D:/Linked In/build-LinkedIn-Desktop_Qt_6_6_2_MinGW_64_bit-Profile’
mingw32-make: *** [Makefile:45: release] Error 2
14:54:01: The process “C:QtToolsmingw1120_64binmingw32-make.exe” exited with code 2.
Error while building/deploying project LinkedIn (kit: Desktop Qt 6.6.2 MinGW 64-bit)
When executing step “Make”
14:54:01: Elapsed time: 00:02.`
Any idea how can I fix it?