How to customize QMdiSubWindow header using qss?

I would like to customize the QMdiSubWindow header bar. I use qss for this.

QMdiSubWindow { border: 1px solid #000000; background: #000000 }
QMdiSubWindow:title { background: #000000 }

The problem is applying this qss, window icons disappear. I know that you can define these icons in qss for QDockWidget

QDockWidget { ... titlebar-close-icon: url(myCloseIcon.png); ... }

However, I cannot find a way to define it for QMdiSubWindow. Perhaps this does not exist. Do you know if this is possible?

+5
source share
1 answer

As Qt 5.2you can not; did not check 5.3, but AFAIK did not change anything QMdiArea/QMdiSubWindowin the release 5.3.

- QCommonStyle QPainter. . QCommonStyle QStyle . , QCommonStyle, QStyle. QCommonStyle QStyle, .

, , , , QMdiSubWindow QMdiArea, QWidget::setWindowFlags(Qt::FramelessWindowHintflag) QMdiSubWindow . Q_PROPERTY QColor QSS, , QSS.

- MDI , , . , , , . .

QMdiSubWindow, QSS, , .

+1

All Articles