Reply
Thread Tools
Posts: 60 | Thanked: 23 times | Joined on Jan 2010
#1
I got a QMainWindow, and from that i run a QDialog named MyDialog and when MyDialog is displayed and a user clicks the backgroun main window, the QDialog is destroyed or something.. how can i detect that ?

I have tried this:
connect(MyDialog,SIGNAL(destroyed()),process,SLOT( stop()));

But it does not work..

Any ideas?
 
Posts: 415 | Thanked: 732 times | Joined on Jan 2009 @ Finland
#2
I'm not sure about your problem but you could use QDialog's finished signal or reimplement closeEvent.

Edit: Been doing too much desktop applications lately => Removed incorrect advice

Last edited by timoph; 2010-02-13 at 08:13.
 
Posts: 60 | Thanked: 23 times | Joined on Jan 2010
#3
Thank you, but the finish signal does not work. I dont want to reimplement anything, I just want a simple dialog with some user input.
 
Posts: 19 | Thanked: 7 times | Joined on Jan 2010 @ dallas, tx usa
#4
The dialog gets disposed of with a DialogCode of None if you tap on the background form when a modal QDialog is being displayed.

You have to handle accept() / reject() yourself from whatever buttons are on your form. When the background is clicked it is being "canceled" without being rejected.
 

The Following User Says Thank You to nilsbenson For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 12:25.