Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Get the color of a tab in a tab widget
apalomer last edited by
I have developed a GUI in which there is a tab area (QTabWidget). This area is the one with one tab in the image with the title "Graphic". There will be more tabs added while the GUI is beeing used. In this tab, I add a QCustomPlot and I want the backround of this widget to be the same as the color of the tab when it is acctive (the current problem does not come from setting the backround of the QCustomPlot but from getting the appropiate color from the tab widget). I have tried this different options:
but none of them paints the backround of the customPlot with the color of the tab when it is active. If somebody can tell me how to propperly get the color of the tab when it is selected I will apreciate vey much.