PDA

View Full Version : QDockWidget Questions (Borders and Titlebar)



DaveyDave
15th October 2012, 17:55
Hi Guys,
I've got some questions on the use of QDockWidget which I'm hoping you can help me with.

1). Borders. How can I get a decent beveled-styled border between QDockWidget instances?. By default there's no border at all which is odd as presumably the user would want to use the border to drag it to resize the window. It is possible to do this:

w.setStyleSheet("QMainWindow::separator {background: rgb(200, 200, 200);width: 2px;height: 2px;}");

but the result is not good. What I'm looking for is the typical bezel-style edge you get on Qt Designer, for example, between the Widget Box on the left and the main pane.
8307
How can I achieve this with QT?. Presumably it's possible?

2). Title Bar styling. Can someone suggest a method of coloring the title bar of a QDockWidget?. A typical example would be something like Visual Studio where the title bar is coloured blue in response to selecting the window. I'm guessing there's a way to reference the bar using ccs but I can't seem to find a way of doing this. Has anyone any ideas?.

Thanks in advance for any pointers!.

Regards,
Dave