View Full Version : can we dsable the close button of a dialog during runtime, till some process gets exe
vinnu
16th November 2006, 10:17
Hai
can we dsable the close button of a dialog during runtime, till some process gets executed.After this process gets executed i want to retain tthe close button to enabled state.
Regards and Thanks ,
vinayasheela
wysota
16th November 2006, 10:20
You can override the closeEvent and ignore() the event if you don't want your widget closed.
vinnu
16th November 2006, 12:21
i dont want it(closed button) to be in disabled state only.After some process gets executed i want it to get back to the original state i.e enabled state.
thanks
wysota
16th November 2006, 12:24
If you want the behaviour to change then just stop ignoring the event...
void MyWidget::closeEvent(QCloseEvent *e){
if(someVar==true) e->ignore(); else e->accept();
}
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.