cic
2nd December 2013, 16:20
is there any way to set the width and color of each separator in QToolBar?
toolBar -> setStyleSheet("QToolBar::separator { background-color: red; width: 30; height: 30px; }");
e.g the code above can only set general seperator property.
Ive read some posts with possibly assigning an object name but failed.
QAction* separator1 = toolBar->addSeparator();
separator1->setObjectName("separator1");
toolBar -> setStyleSheet("QToolBar::separator#separator1 { background-color: red; width: 30; height: 30px; }");
it has no effect though...
toolBar -> setStyleSheet("QToolBar::separator { background-color: red; width: 30; height: 30px; }");
e.g the code above can only set general seperator property.
Ive read some posts with possibly assigning an object name but failed.
QAction* separator1 = toolBar->addSeparator();
separator1->setObjectName("separator1");
toolBar -> setStyleSheet("QToolBar::separator#separator1 { background-color: red; width: 30; height: 30px; }");
it has no effect though...