Results 1 to 5 of 5

Thread: QWidget background

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Jan 2008
    Location
    Finland /Pakistan
    Posts
    216
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    20
    Thanked 1 Time in 1 Post

    Default Re: QWidget background

    i have solved it,not a big thing...jus not declare palette as pointer..

    Qt Code:
    1. QPalette palette;
    2. palette.setBrush(this->backgroundRole(), QBrush(QImage("backgroundImage.jpg")));
    3.  
    4. this->setPalette(palette);
    To copy to clipboard, switch view to plain text mode 
    Last edited by jpn; 27th July 2008 at 13:31. Reason: missing [code] tags

Similar Threads

  1. Dynamic updates of a QWidget in a QScrollArea
    By plamkata in forum Qt Programming
    Replies: 2
    Last Post: 20th July 2008, 23:45
  2. background image for QWidget
    By raman_31181 in forum Qt Programming
    Replies: 2
    Last Post: 8th March 2008, 11:13
  3. Replies: 10
    Last Post: 17th August 2006, 15:12
  4. background colour
    By kw in forum Qt Programming
    Replies: 6
    Last Post: 11th April 2006, 00:44
  5. Replies: 1
    Last Post: 5th April 2006, 16:44

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.