QLabel: outline text (stroke)

  • Not sure which keyword is correct, but I am wondering if it is possible to outline the text of a QLabel.
    Something like this:
    Thanks for your help!

  • Hi!

    Everything is possible ;-).

    There would be a way whith CSS, if Qt would supported it ( or any browser)
    @text-outline: 1px 1px #F00;@
    Or, not the ideal solution, but would also work
    @text-shadow: 0 0 3px #F00;@

    Because neither is possible, you will probably need to bake two images, and show it as one.
    You can also try showing two labels one over another, with different font settings.
    Also, another option would be ( at which I didn't succeed), using html and css to add one text over another.

  • So I guess by "everything is possible" you mean that this particular case is not?

  • Moderators

    Everything is possible, but not everything is possible right out of the box. There's generally some way to accomplish something, but it might not be clean, easy, or pretty.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.