Results 1 to 3 of 3

Thread: Dialog Background Color using Hand Code

  1. #1
    Join Date
    Jun 2009
    Location
    India
    Posts
    143
    Thanks
    16
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Dialog Background Color using Hand Code

    Hi,

    I am new to Qt 4 Development. I have created a new form " Dialog without Buttons " Using Qt Designer. Now i need to change the Background color of the form by hand code ..How can i do it. Please help me

  2. #2
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    658
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Dialog Background Color using Hand Code

    use stylesheet or QPalette on your ui class ...
    "Behind every great fortune lies a crime" - Balzac

  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Dialog Background Color using Hand Code

    With designer, you can easily change the palette !
    Just needs about 30 seconds to do the changes I guess

    And if you want to hand code / do it with code , you can use QWidget::setPalette

Similar Threads

  1. Issue with Modelless dialog on Mac
    By Satyanarayana Chebrolu in forum Qt Programming
    Replies: 0
    Last Post: 24th February 2009, 10:10
  2. How to dim / blur the background dialog?
    By german@it-missions.com in forum Qt Programming
    Replies: 2
    Last Post: 18th February 2009, 07:40
  3. dialog box
    By Bahar in forum Qt Programming
    Replies: 3
    Last Post: 31st January 2006, 14:52

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.