Results 1 to 4 of 4

Thread: why StyleSheet color setting changine button shape?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2007
    Location
    Rakovnik, Czech Republic
    Posts
    175
    Thanks
    43
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default why StyleSheet color setting changine button shape?

    Hey, I'm trying to do a rather simple thing: control the color of my QPushButtons when isUp, isDown, hover, etc. I'm doing this:

    Qt Code:
    1. myPb->setStyleSheet("QPushButton { background: rgb(230,230,230)}");
    To copy to clipboard, switch view to plain text mode 

    which works, but changes the shape & look/feel of the buttons from normal to rectangular... best explained by looking at the attached image. "Co2 Hist" and "Co2 Proj" are the buttons with the setStyleSheet functions. The others are left alone/default.

    Can anyone suggest the simplest way to simply have the buttons look as they normally do, but with my own custom colors?
    Attached Images Attached Images

Similar Threads

  1. how to change backgroup color, button color and shape?
    By lzha022 in forum Qt Programming
    Replies: 10
    Last Post: 16th June 2008, 22:25
  2. shape of push button
    By Seema Rao in forum Qt Programming
    Replies: 23
    Last Post: 2nd April 2008, 01:05
  3. 3d button stylesheet?
    By MrGarbage in forum Qt Programming
    Replies: 2
    Last Post: 28th November 2007, 21:50

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.