Results 1 to 19 of 19

Thread: How to set my QPushbutton's background?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2009
    Posts
    21
    Thanks
    11
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: How to set my QPushbutton's background?

    I followed the exact code to update the QPalette to change the QPushButton's color but it never showed the color. I compiled my code for Qt 4.5.3 on *both* Unix/X11 and Qt-Embedded, none worked I tried Qt Designer as well, color's not shown either. It works with style sheet, but what I'm trying to have a blinking button that changes colors ever 0.5s, and just that eats up 95% CPU consumption! Admittedly we don't have a very powerful one so I was hoping using QPalette would help the performance.

    Anyhow, do you guys have any more ideas? I do have a style sheet applied at the top level Form, but it should be overwritten when I update palette for a particular button, right?

    Thanks in advance.

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to set my QPushbutton's background?

    can you show us you code?
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. Replies: 5
    Last Post: 21st July 2010, 22:51
  2. Replies: 2
    Last Post: 10th February 2009, 13:12
  3. QLCDNumber with transparent background?
    By PolyVox in forum Qt Programming
    Replies: 2
    Last Post: 20th October 2008, 05:34
  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

Tags for this Thread

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.