Here's my code:
const QString STYLE_SHEET = "background-color: rgba(x,x,x,y);"
"border: 1px solid gray;"
"border-radius: 0px;"
"border-top: 1px solid red;"
"border-bottom: 1px solid blue;"
"border-radius: 0px;";
The SS is applied later in the code like this:
QWidget * myWidget;
myWidget = new QWidget(parent);
myWidget.setObjectName("myWidgetName");
myWidget.setStyleSheet(STYLE_SHEET);
It works like a champ except that the borders bleed into a child QFrame. If I add specificity to STYLE_SHEET by bracketing it with the following:
const QString QWidget#myWidgetName { }
The STYLE_SHEET ceases to apply. It solves the bleed down to the child QFrame but my QWidget loses its style. And what good is a QWidget without style?