0
votes

In my application i need to use dark grey color border for my progress. by googling i changed the border color and background color successfully like,

QString st = QString ("QProgressBar::chunk {""background-color: #00B82E;""}");
st.append("QProgressBar {""border: 6px solid grey;" "border-radius: 9px;""text-align: center;""background: #00B82E;""}");
Progress->setStyleSheet(st);

but not able to find out the list of border color like "border: 6px solid grey;".How to find out list of colors like "6px solid grey" because i need to change another color for border

1

1 Answers

1
votes

Qt Style Sheets take a lot from HTML Cascading Style Sheets (CSS).

Documentation for QColor::setNamedColor says that a color name can be one of SVG color keyword names:

A name from the list of colors defined in the list of SVG color keyword names provided by the World Wide Web Consortium; for example, "steelblue" or "gainsboro". These color names work on all platforms. Note that these color names are not the same as defined by the Qt::GlobalColor enums, e.g. "green" and Qt::green does not refer to the same color.

SVG color keyword names: http://www.w3.org/TR/SVG/types.html#ColorKeywords