hi,
I want a messagebox with no icon and with ok button alone.
I wrote my code like this.
QMessageBox::information(Parent,Title,msg,QMessage Box::Ok);
It displays a information icon.
I dont want it.How to remove that.
THANKS
hi,
I want a messagebox with no icon and with ok button alone.
I wrote my code like this.
QMessageBox::information(Parent,Title,msg,QMessage Box::Ok);
It displays a information icon.
I dont want it.How to remove that.
THANKS
So don't use QMessageBox::information() which sets the informative icon but instantiate a QMessageBox without any icon.
J-P Nurmi
I tried like this ...But the MessageBox is appearing for a second and then disappears.Wt to do???
Qt Code:
msg->show();To copy to clipboard, switch view to plain text mode
Last edited by jpn; 28th March 2008 at 12:26. Reason: missing [code] tags
Could you show us the actual code?
J-P Nurmi
I m trying to convert the below vc++ code to Qt.
::MessageBox(Parent->m_hWnd, msg, title, MB_OK);
And i have sent u the actual code i had replaced previously.
Use exec() instead of show().
sonuani (28th March 2008)
Now the messagebox is appearing properly.If i click on the ok button then the messagebox should close.
At present the messagebox is getting closed only after I click on ok button 2 times.Why is that so???
Could it be that the function containing the code gets called twice? Try setting a breakpoint at the line before exec().
Yogesh M
http://sparklemedia.sourceforge.net/
hi,
when i debug the control passes through the messagebox only once.But when i execute it it gets displayed 2 times (i.e If i give ok to the first messagebox then another one appears)
What is the problem with my code?
Thanks.
Could you show us the relevant code?
It should remain visible because you allocate it on the heap, but what if you do:
Qt Code:
msg.exec();To copy to clipboard, switch view to plain text mode
J-P Nurmi
Bookmarks