How to set background of QToolBar's Dockarea in QMainWindow Mac OS?
-
-
hi
image is not showing :)

-
Hi
Do you have other stylesheets active ?
Seems to color all of it on default gui project
-
This QToolBar in Mac OS. I also test it in Win, it is Ok.
But, It has failed, In Mac. In Mac, The gray area is toolbar dock area in mainwindow.
All the QSS at here
QWidget { background:white; } QToolBar { spacing: 0px; } QToolBar::handle { background: white; } QDockWidget { background: white; } -
Ah
so it does so on mac only.
You are using the normal toolbar and not QMacToolBar ?
sorry have no mac to test with. Its a bit odd its not affected by "Qwidget" -
Ah
so it does so on mac only.
You are using the normal toolbar and not QMacToolBar ?
sorry have no mac to test with. Its a bit odd its not affected by "Qwidget" -
I used below QSS to my app.
QWidget { background:white; } QToolBar { spacing: 0px; } QToolBar::handle { background: white; } QDockWidget { background: white; }I want to set the whole toolbar's background white. But, has failed. like :

Thank u.
About this question. Because I used
QToolBarin Mac. It was not good way.In Mac, should using
QMacToolBar. But, In Windows, you need to useQToolBar.So,In the one Qt project, You should use
Q_OS_MacandQ_OS_Winmacro to write code in different OS. I think it's not one good way.It just one
ToolBar, include someToolButtons. That's all. So, The best way is to usingQWidgetasToolBar, add someToolButtonsinQWidget. and do not forget to removemainToolBarfromQMainWindow.