Hide the border of a tool bar?
Hi, I need to hide the border of a tool bar and only show its actions because I have only 4 actions in the tool bar and it ocupies all the avaiable space. I've tried not using the tool bar and use flat buttons but the problem is that when the mouse is under the buttons its border is not painted (differing with the QActions in a tool bar). Anybody knows if it's possible in a simple way? I know that a possible solution could be reimplementig the paintEvent of the tool bar but it's a bit "hard"... ;)
PD: I also want to know if it's possible to center the actions in the tool bar
Re: Hide the border of a tool bar?
But which "border" do you mean? The handle or "separators" around the actions (the ones above and below actions for a horizontal orientation of a toolbar)? I don't think you'll be able to get rid of them without reimplementing some stuff.
Re: Hide the border of a tool bar?
If you don't want the toolbar functionality, and just a place to put toolbuttons, you might want to consider just a plain widget, and use a layout to put it where you want.
Re: Hide the border of a tool bar?
Ok I will take in account, thanks wysota and Brandybuck. All that I want is have a button that acts like an action in a tool bar: if the mouse is not under the button, its border is hidden. And when the mouse is under the button, the border is shown (it's not the "flat" property). But I don't know if it's possible...
Re: Hide the border of a tool bar?
I am also wish to hide the border of the toolbar. Can you help me? Thanks.
Re: Hide the border of a tool bar?
Isn't that the QToolButton::setAutoRaise(true) call you are looking for?
It makes QToolButtons act just like buttons on a toolbar (the "border" is hidden, but when the mouse hovers the button, the border is drawn, and you get a "raise" effect) :)
Re: Hide the border of a tool bar?
The buttons on a toolbar are QToolButtons :)