PDA

View Full Version : QDialog, Mainwindow



triperzz
15th February 2008, 04:50
how can i disable the "x" button of the dialog or mainwindow??

the root of my problem is when my app is still processing(loop) and the user click the "x" button it closes but it doesnt terminate the whole program the loop is still running..

thanks

jpn
15th February 2008, 07:59
how can i disable the "x" button of the dialog or mainwindow??
There is no cross-platform way to do that. However, you can do it with WinAPI, see this post (http://www.qtcentre.org/forum/f-qt-programming-2/t-disable-close-button-x-of-a-qdialog-9348.html#13).


the root of my problem is when my app is still processing(loop) and the user click the "x" button it closes but it doesnt terminate the whole program the loop is still running..
Instead of disabling the close button you could just ignore close event to prevent the dialog from closing.