Quote Originally Posted by anda_skoa View Post
Usually moc files are regenerated when the header file used as their input changes.

Maybe the Visual Studio Addin has bad change tracking.

In this particular case you don't even needt the slot, as close() is a slot and you can directly connect the exit button to close.

Cheers,
_
I'm planning on adding more lines to the function once it is working, I need to set a bool when the exit button is clicked, so I can't just connect this button to exit().

I tried deleting q_object and adding it back to force the moc files to generate again. I also tried deleting all moc/ui files to force regenerate, also didn't work.

In the end, I had to copy all of my code into qt creator, recompile, and then import it back into VS. A lot of hassle simply to add a slot, but oh well...