View Full Version : How to create a QToolBar without a border?
dave
26th July 2010, 20:56
Hi all
Is it possible to create a QToolBar without a border and without using styles?
Lykurg
26th July 2010, 21:04
What border do you mean? Generally, you can subclass QToolBar and do the background painting yourself.
dave
26th July 2010, 21:13
What border do you mean?
like this: http://imgur.com/SkazA.jpg
Generally, you can subclass QToolBar and do the background painting yourself. Well, yes. I was looking for an easier way :).
Lykurg
26th July 2010, 21:18
What style do you use? You also can modify your style which is maybe easier by reacting on QStyle::PE_PanelToolBar. See also QProxyStyle.
dave
27th July 2010, 11:28
I'm dumb. Forgot all about stylesheets. So I finally went and used this:
tb->setStyleSheet("QToolBar { border: 0px }");. Works great.
Lykurg
27th July 2010, 11:37
Ok, I misunderstand your fist question, because I thought you don't want to use style sheets. :o
dave
27th July 2010, 15:31
Yes, I was pretty confused myself. I thought you could only change the look of a widget by subclassing QStyle.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.