Results 1 to 5 of 5

Thread: QLabel Painting

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2006
    Posts
    29
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1

    Default Re: QLabel Painting

    Hi

    thanks for your mail. Exactly i want that type of style. , But setPaletteForeground is not working. Can you tell me what will be exact function.

    thanks and regards
    vijay

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: QLabel Painting

    Qt Code:
    1. label->setFrameStyle(QFrame::Plain | QFrame::Box);
    2. label->setLineWidth(3);
    3. QPalette pal = label->palette();
    4. pal.setColor(label->foregroundRole(), Qt::white);
    5. label->setPalette(pal);
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

Similar Threads

  1. Trouble with QLabel
    By dany_MB in forum Newbie
    Replies: 3
    Last Post: 14th August 2009, 09:21
  2. Replies: 3
    Last Post: 17th July 2008, 08:43
  3. QLabel ScaledContents ignored by style sheet?
    By WinchellChung in forum Newbie
    Replies: 3
    Last Post: 27th February 2008, 15:50
  4. QLabel size policy
    By Caius Aérobus in forum Qt Programming
    Replies: 3
    Last Post: 7th December 2007, 18:57
  5. QScrollArea display custom QLabel
    By spawnwj in forum Qt Programming
    Replies: 6
    Last Post: 6th December 2006, 04:38

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
  •  
Qt is a trademark of The Qt Company.