Unsolved set a color-border of the QDockWidget
-
how to set a color-border of the QDockWidget without influncing all the other widget on th DockWidget.
and the Dockwidget has no boder by default, eg.there is no line-border between two adjacent DockWidgets. -
-
@jsulm not work for a custom class.
eg. class myDock : public QDockWidget -
@opengpu It should be fine i fell, as you are inheriting your class from
QDockWidget
andsetStyleSheet
is a public function.customClassObj->setStyleSheet("QDockWidget { " "border: 1px solid lightgray; " "titlebar-close-icon: url(close.png); " "titlebar-normal-icon: url(undock.png); " "}");
All the best.
-
@Pradeep-P-N
customClassObj->setStyleSheet("QDockWidget { border: 1px solid lightgray; }");
i tried this...not work.
and @constructor, setStyleSheet("QDockWidget { border: 1px solid lightgray; }");
also not work.
setStyleSheet("border: 1px solid lightgray;"); this work, but make everything on the DockWidget with the border -
@Pradeep-P-N said in set a color-border of the QDockWidget:
customClassObj->setStyleSheet("QDockWidget { " "border: 1px solid lightgray; " "titlebar-close-icon: url(close.png); " "titlebar-normal-icon: url(undock.png); " "}");
not work...donot know why...
myDockWidget->setStyleSheet("QDockWidget { "
"border: 5px solid red; "
"}"); -
but this work...
myDockWidget->setStyleSheet("QDockWidget::title {text-align: left; background: red; padding-left: 5px;}");