You are not logged in.

Dear visitor, welcome to If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Friday, November 18th 2011, 10:51pm

Error caused by removed menu item

Hi, I'm getting the following error when I'm trying to compile a Qt Widget project I have created in Qt Creator:

Source code

D:\Work\MD\MD-build-desktop-Qt_4_7_4__4_7_4__Debug\debug\moc_mdmainwin.cpp:72: error: undefined reference to `mdmainwin::on_actionExit_triggered()'

but I have removed that function from my code and the "Exit" action in the Files menu that was associated with the function. So why is it still trying to find the function?

This post has been edited 1 times, last edit by "Now" (Nov 20th 2011, 10:47am)


Sunday, November 20th 2011, 11:19am

because you havent got rid of it? check designer files as well.

Just because you 'got rid of the action', doesn't mean something is still trying to use it. Maybe you left it in a header file.
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.


Tuesday, November 22nd 2011, 5:06pm

Maybe you left it in a header file.
Yes, that was it. I undid removing the action and continued developing the project with it still being there. Later on when I looked in the header file, I saw the declaration of the slot and realized it was what I had forgot to remove.

Similar threads

Used tags

error, Slot