Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[Solved]How to perform 'reject' of main dialog from inside widget?
There is a widget inside of main dialog
this widget was promoted to a widget class
I want to perform main dialog's 'reject' when press close button of inside widget.
I tried 'exit(0)' but it doesn't perform 'reject'. so I have to add same redundant code to do some work before close.
and 'close()' just close inside widget itself..
How to deal with it?
I found solution
Hi and welcome to devnet,
A cleaner solution would be to connect the clicked signal of your close button to the reject slot of your MainDialog
[quote author="SGaist" date="1419712665"]Hi and welcome to devnet,
A cleaner solution would be to connect the clicked signal of your close button to the reject slot of your MainDialog[/quote]
In MainDialog's constructor
Is that right? Thank you!
Yes, however you should rather call that signal reject also