Qt-interest Archive, October 2007
tags in setWindowTitle() ?
Message 1 in thread
All Qt players,
I like the text format feature setting for QString - might be, or sounds
like, rich text, or html format - then tags are taken and rendered
nicely in label.
But this does not apply for setWindowTitle(). If you use a tag, the tag
will be displayed silly as it is.
For example:
app.setWindowTitle(QObject::tr("<b>Bold</b>")); // Does not display bold !
Does anyone have a simple explanation?
Thanks
Lingfa
--
[ signature omitted ]
Message 2 in thread
On 10/19/07, Lingfa Yang <lingfa@xxxxxxx> wrote:
>
> All Qt players,
>
> I like the text format feature setting for QString - might be, or sounds
> like, rich text, or html format - then tags are taken and rendered
> nicely in label.
>
> But this does not apply for setWindowTitle(). If you use a tag, the tag
> will be displayed silly as it is.
> For example:
> app.setWindowTitle(QObject::tr("<b>Bold</b>")); // Does not display bold !
>
> Does anyone have a simple explanation?
>
> Thanks
> Lingfa
Hi there,
As far as I know (as a mostly Windows user and occasional Mac and Linux
user), I believe this is because most window systems just don't support rich
formatting in window titles.
Evan
(Sorry, first one went to your address rather than the Qt list.)
Message 3 in thread
> Hi there,
>
> As far as I know (as a mostly Windows user and occasional Mac and
> Linux user), I believe this is because most window systems just don't
> support rich formatting in window titles.
>
> Evan
Even,
I see, but do you mean Qt gives up randering in windows title, and let
the operation system takes care of look-and-feel?
Regards,
Lingfa
--
[ signature omitted ]
Message 4 in thread
> Even,
>
> I see, but do you mean Qt gives up randering in windows title, and let
> the operation system takes care of look-and-feel?
>
> Regards,
> Lingfa
Yes, that's pretty much it - it's because many operating systems / windowing
systems just don't provide a way for applications or application toolkits
(such as Qt) to create rich text window titles.
Evan
Message 5 in thread
Yes, the simple explanation is that is cannot be done. :)
Window title bars are system dependant in many cases. Regardless, the style
should match system standards.
Keith
**Please do not reply to me, reply to the list.**
On 10-19-2007 9:49 AM, "Lingfa Yang" wrote:
> All Qt players,
>
> I like the text format feature setting for QString - might be, or sounds
> like, rich text, or html format - then tags are taken and rendered
> nicely in label.
>
> But this does not apply for setWindowTitle(). If you use a tag, the tag
> will be displayed silly as it is.
> For example:
> app.setWindowTitle(QObject::tr("<b>Bold</b>")); // Does not display bold !
>
> Does anyone have a simple explanation?
>
> Thanks
> Lingfa
--
[ signature omitted ]
Message 6 in thread
Keith Esau wrote:
>Yes, the simple explanation is that is cannot be done. :)
>
>Window title bars are system dependant in many cases. Regardless, the style
>should match system standards.
>
>Keith
>**Please do not reply to me, reply to the list.**
>
>
Yes, quite right!
Thanks,
Lingfa
--
[ signature omitted ]