[Qt-interest] How to make the tittle bold?

Aaron Lewis aaron.lewis1989 at gmail.com
Wed Apr 7 14:27:35 CEST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sometimes i work like this:

    QMessageBox box;
    box.setFont(QFontDialog::getFont(0,this));	// Change it to a
`well-known' fonts
    box.setText(tr("Hello World"));
    box.exec();

Change QFontDialog to something else , a known fonts.

Maybe you want to try with HTML code , it's just yet another way.

Hope it helps ;-)

On 04/07/2010 08:12 PM, Ramesh wrote:
> Hi all,
> 
>  
> 
> In Qmessagebox how can I make the tittle text bold?
> 
> Here is the sample code, which I am using to disply a messagebox
> 
>  
> 
> int ret = QMessageBox::warning(this, tr("My Application"),
> 
>                                 tr("document has been modified.\n"
> 
>                                    "Do you want to save your changes?"),
> 
>                                 QMessageBox::Save | QMessageBox::Discard
> 
>                                 | QMessageBox::Cancel,
> 
>                                 QMessageBox::Save);
> 
>  
> 
> I just want "tr("My Application")" to be bold, and rest to be in normal
> font.
> 
> How can I do that?
> 
>  
> 
> By default I am getting the normal font for both title and descriptive text.
> 
>  
> 
> Thanks.
> 
> 
> -----------------------------------------------
> Robosoft Technologies - Come home to Technology
> 
> Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.
> 
> 
> 
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest


- -- 
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAku8ejcACgkQvf41sEptMqDGcgCgqHQq+8SJjDDyKOoE1FwTNy5B
ufcAoIN3u9JbkO6LRaKRP/y4zh7mrJ5w
=muDO
-----END PGP SIGNATURE-----



More information about the Qt-interest-old mailing list