PDA

View Full Version : Re: Help on QMessageBox



arunvv
25th March 2008, 22:12
Hi All,

I have a UI form which has some pushbuttons, clicking on one of the button it has to popup a message which was implemented by QMessageBox.
I created QMessageBox as question which has "Yes" "No" as buttons.
When I click on "Yes" it has to open a new window/form which will have 10-12 labels and lineedits to display some values in it.

How to implement the connection between QMessage Yes button to a form which has Labels and Lineedits, or is there any better way to implement for opening a new window when clicking on Yes button for QMessageBox.

Thanks & Regards,
Arun.

wysota
25th March 2008, 23:15
The message box will return the button that was clicked. Based on that you can perform some changes to the widget. Something like that:

if(QMessageBox::question(....) == QMessageBox::Yes){
myWidget->doSomething();
}

arunvv
25th March 2008, 23:45
Thanks wysota,

That helped thanks for your reply.