Results 1 to 2 of 2

Thread: QLabel colours

  1. #1
    Join Date
    Jan 2006
    Location
    Munich, Germany.
    Posts
    111
    Thanks
    29
    Thanked 3 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default QLabel colours

    sorry about the trivial question::

    how do I change the border colour of a QLabel without changing the text colour?
    (pseudo code)
    QPalette p.setColor ( QPalette::WindowText, Yellow);
    Qlabel setPalette(p),

    will draw text yellow, but the border is drawn yellow too.

    thanks
    K

    I can do it using style sheets, but is there a 'standard' way?
    Last edited by TheKedge; 14th May 2007 at 16:12.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QLabel colours

    What do you mean by the border? The frame? I don't think changing the text colour changes the frame colour... Could you post a minimal compilable example reproducing the problem?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.