Results 1 to 3 of 3

Thread: Background Color for main window

  1. #1
    Join Date
    Apr 2012
    Posts
    14
    Qt products
    Qt3 Qt4
    Platforms
    Windows
    Thanks
    1

    Default Background Color for main window

    How to set background color for the MainWindow.? Can some one help me out with this.?

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Wiki edits
    5

    Default Re: Background Color for main window

    Try to use QPalette! Also a look to setAutoFillBackground() can help.

  3. #3
    Join Date
    Nov 2006
    Location
    indonesia
    Posts
    55
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 11 Times in 11 Posts

    Default Re: Background Color for main window

    Hi,
    You can use QPallete or QStyleSheet. You can get the sample code at here :
    http://toto-share.com/2011/11/qt-change-qwidget-color/
    Or you can get many of tutorial from google. Please try that

    Regards,

    Toto

Similar Threads

  1. Replies: 2
    Last Post: 17th February 2011, 12:30
  2. Unable to load background image in Main Window
    By bedbuffer in forum Newbie
    Replies: 0
    Last Post: 16th December 2010, 08:40
  3. Replies: 11
    Last Post: 11th August 2008, 09:14
  4. Background image for main window widget using css.
    By Enygma in forum Qt Programming
    Replies: 8
    Last Post: 23rd August 2007, 15:40
  5. Replies: 15
    Last Post: 23rd March 2007, 16:16

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.