PDA

View Full Version : Access to the QSplitter of a QMainWindow



UweS
30th November 2010, 14:44
Hello,

I would like to change the background color of the QSplitter in a QMainwindow.
I tried setting the styleSheet. But there is a problem. My mainwindow is inside a COM control, realized using QAxBindable. So I have no main() and I can not modify the styleSheet before the mainWindow is created.

If I use a Qt application as container for my COM control, everything works fine, the splitter gets the grey color derived from the parent (container).
But do I use the control in a WPF (Windows Forms) container, the splitter remains white. Because most of my centerWidgets or dockingwidgets also have a white background, the splitter can not be seen very good.

Greetz, Uwe

UweS
3rd December 2010, 10:18
I tried to find the splitter among the children of the mainwindow

QSplitter* splitter = this->findChild<QSplitter*>();

or I tried to find all widgets

QList<QWidget*> swList = this->findChildren<QWidget*>();

and have set the color of all roles in the palette to red.
Everything turned red except the splitter.

Has anyone a hint for what I should search?