setStyleSheet for QToolBar::separator?
-
In the constructor of a vertical toolbar class that inherits from QToolBar, I am trying
setStyleSheet("border-left:1px solid rgb(180,180,180); separator:{background:yellow;height:80px;};");
Works for the border, but not for the separators (created later on by
addSeparator()
statements).Anything wrong here? Any other way to set the height of a separator?
-
In the constructor of a vertical toolbar class that inherits from QToolBar, I am trying
setStyleSheet("border-left:1px solid rgb(180,180,180); separator:{background:yellow;height:80px;};");
Works for the border, but not for the separators (created later on by
addSeparator()
statements).Anything wrong here? Any other way to set the height of a separator?
@Joachim-W said in setStyleSheet for QToolBar::separator?:
Anything wrong here?
Yes, the separator stylesheet.
::separator
is a sub-control ofQToolBar
and therefore can't put next to the general properties ofQToolBar
, likeborder-left
.
It needs its own container.setStylesheet("QToolBar {border-left:1px solid rgb(180,180,180);} ::separator{background:yellow; height:80px; };");
-