Results 1 to 4 of 4

Thread: background color of a MainWindow

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2006
    Location
    Bangalore,India
    Posts
    235
    Thanks
    7
    Thanked 25 Times in 24 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: background color of a MainWindow

    try this in your mainwindow class constructor:
    tested code:
    Qt Code:
    1. QPalette palette;
    2. palette.setColor(backgroundRole(), Qt::black);
    3. setPalette(palette);
    To copy to clipboard, switch view to plain text mode 

  2. The following user says thank you to rajesh for this useful post:

    sabeesh (25th July 2007)

  3. #2
    Join Date
    Jul 2007
    Posts
    166
    Thanks
    25
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: background color of a MainWindow

    Hi,
    Thankyou
    it's working

    Sabeesh

Similar Threads

  1. background colour
    By kw in forum Qt Programming
    Replies: 6
    Last Post: 11th April 2006, 00:44
  2. 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.