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

Andre Somers andre at familiesomers.nl
Wed Apr 7 14:20:11 CEST 2010


On 7-4-2010 14:12, 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.
>
>
AFAIK, you can just set HTML text. So try using:

tr("<html><b>document has been modified.</b><br/>"
"Do you want to save your changes?")

or something like that...

André

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100407/7605b0a7/attachment.html 


More information about the Qt-interest-old mailing list