Hi,
why when i press no button the program will close?
thank uCode:
msg.setText("Are you sure you want to Quit?"); if(msg.clickedButton()==no){ event->ignore(); } else{ event->accept(); } msg.exec(); }
Printable View
Hi,
why when i press no button the program will close?
thank uCode:
msg.setText("Are you sure you want to Quit?"); if(msg.clickedButton()==no){ event->ignore(); } else{ event->accept(); } msg.exec(); }
The code you posted makes no sense. With the current code, regardless what you do with the message box, the window will close. Try this:
Code:
}
thanks but
give me an error....
no matching function for call to 'QMessageBox::question(const char [31])'
^
So lookup the function in the docs and adjust your code to the required signature.