PDA

View Full Version : QDockWidget::title is painting over other widgets with QSS



edisongustavo
16th March 2010, 23:44
Hi QT community.

I have a QDockWidget, which has a QFrame inside it (it's actually a QScrollArea) and I need to change their styles according to what the designer asked.

He asked that the title be a box, smaller than the width of the QDockWidget, with round corners, etc.

So I tried to do it with QT's qss system. Then I'm now stuck with this:

4423

The left is a QTabWidget, in which I could do the frame line pass in the middle of the title. I did that with this qss:


QTabWidget::pane {
top: -5px;
...
}

So I tried doing the same with the QFrame inside the QDockWidget:


QDockWidget > QFrame {
margin-top: -5px; /* top actually does nothing, so I tried to switch to margin-top */
}

But I get the following results:

4424

The border of the QFrame is hidden by the QDockWidget title.

Any help is appreciated, be it in code or qss.

Thanks for any help.