Hi all
Is it possible to create a QToolBar without a border and without using styles?
Printable View
Hi all
Is it possible to create a QToolBar without a border and without using styles?
What border do you mean? Generally, you can subclass QToolBar and do the background painting yourself.
like this: http://imgur.com/SkazA.jpg
Well, yes. I was looking for an easier way :).
What style do you use? You also can modify your style which is maybe easier by reacting on QStyle::PE_PanelToolBar. See also QProxyStyle.
I'm dumb. Forgot all about stylesheets. So I finally went and used this:. Works great.Code:
tb->setStyleSheet("QToolBar { border: 0px }");
Ok, I misunderstand your fist question, because I thought you don't want to use style sheets. :o
Yes, I was pretty confused myself. I thought you could only change the look of a widget by subclassing QStyle.