That's the Designer I meant
Ok, here is what to do: open the form for editing, right click on your close button, left click on "Go to Slot..."
This will create a slot for you in the .h and .cpp files and immediately show the .cpp slot code in your editor.
Inside that slot function, put the code: close(); and any other code you need to execute before closing the dialog - your choice.
Now your dialog is modal (by using the exec() to open it, so no other window is active until you close it, and clicking the 'close' button or whatever you called it, will close your dialog.
This is the cheap and easy way of making your close or cancel button work.
Does that do it?
Bookmarks