Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, May 2008
QMessageBox


Message 1 in thread

I want to change the pixmap with my personal images in the QMessage warning
and about, also I need help with the Push Buttons on the QMessageBox about
changing the text displayed because they are in English but i want to change
it. Thanks

Message 2 in thread

Try to explore Qt Style Sheets Reference.

There is ability to customize QMessageBox.

 

From: Aftab Hussain [mailto:raidiux@xxxxxxxxx] 
Sent: Tuesday, May 13, 2008 10:16 AM
To: qt-interest@xxxxxxxxxxxxx
Subject: QMessageBox

 

I want to change the pixmap with my personal images in the QMessage warning and about, also I need help with the Push Buttons on the QMessageBox about changing the text displayed because they are in English but i want to change it. Thanks   


Message 3 in thread

Hi,

> I want to change the pixmap with my personal images in the QMessage 

Try setIconPixmap():
http://doc.trolltech.com/4.4/qmessagebox.html#iconPixmap-prop

> warning and about, also I need help with the Push Buttons on the 
> QMessageBox about changing the text displayed because they are in 
> English but i want to change it. Thanks  

Use the internationalization framework:
http://doc.trolltech.com/4.4/i18n.html

-- 
 [ signature omitted ] 

Message 4 in thread

Aftab Hussain wrote:
>I want to change the pixmap with my personal images 
>in the QMessage warning and about, also I need help 
>with the Push Buttons on the QMessageBox about changing 
>the text displayed because they are in English but i 
>want to change it. Thanks   

You already got some advice here, but if you do

	QMessageBox::information(NULL, tr("Some localized text"), tr("More
localized text."));

you won't localize the OK button. You can try using the button() method.

	http://doc.trolltech.com/4.4/qmessagebox.html#button

and then use setText() to change the text in the button.

However, you might try the documentation at

	http://doc.trolltech.com/4.4/i18n.html

because you can localize the buttons without actually 
doing the button()->setText() yourself.

-- 
 [ signature omitted ] 

Message 5 in thread

Am Dienstag, 13. Mai 2008 schrieb Taipale, Eero:
> Aftab Hussain wrote:
> >I want to change the pixmap with my personal images
> >in the QMessage warning and about, also I need help
> >with the Push Buttons on the QMessageBox about changing
> >the text displayed because they are in English but i
> >want to change it. Thanks  
> You already got some advice here, but if you do
> 	QMessageBox::information(NULL, tr("Some localized text"), tr("More
> localized text."));
> you won't localize the OK button.

Well, "you" (as in the dev writing the app) might not localize the OK-button, 
but Qt with i18n-support will do that automatically :-)

Just read and follow that:
> 	http://doc.trolltech.com/4.4/i18n.html

Have fun,

Arnold
-- 
 [ signature omitted ] 

Attachment: signature.asc
Description: This is a digitally signed message part.