Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set QDockWidget border when docked and floating

I'm trying to style my QDockWidget so that it has a border when docked and when floating.

I tried:

QDockWidget 
{
    border: 5px solid purple;
}

But this only produced a border when floating. When docked, the border just disappeared.

How can I solve this?

like image 384
John-Luke Laue Avatar asked Mar 18 '15 02:03

John-Luke Laue


1 Answers

Try

QDockWidget > QWidget {
    border: 5px solid purple;
}

This is the result for the docked state:

enter image description here

This is the result for the undocked state:

enter image description here

like image 194
Iuliu Avatar answered Oct 15 '22 05:10

Iuliu