qss - How to add style via setStyleSheet() without losing orignal style in Qt? -


I can use setStyleSheet () to set the style in Konw I Qt. But I had to face a problem setStyleSheet () set by the first set of setStyleSheet ()

The times have lost the first genres, / Strong>,

setStyleSheet ("QLabel {color: red;}");

............

  setStyleSheet ("QLabel {border-image: url (...... }} ")  

When I set a border-image, red property is lost. Try to solve it by using

setStyleSheet (styleSheet () + QString ("QLabel {limit-image: url (......)}"))) Is;

But it was similar that only the property of the border-image was present.

When I use set stylesheet (), then I should add the properties of each style, although I

raise my poor written English Thank you. Any suggestions would be appreciated.

You can set the stylesheets without a QLabel tag:

  SetStyleSheet ("color: red;");  

After setting up a stylesheet property, you can add another property such as:

  setStyleSheet (stylesheet () .append (customs ("border -search: url (......); ")));  

Comments

Popular posts from this blog

c# - The item with identity 'Id' already exists in the metadata collection. Parameter name: item -

sql - PostgreSQL automatically update row at specific date -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -