The QToolBar class, part of the Qt framework, provides a movable panel that acts as a container for a set of controls.
Questions tagged [qtoolbar]
108 questions
1
vote
4 answers
Remove gradient from QToolBar in OS X
I am writing an application in Qt, which uses QToolBar elements. In Linux and Windows, all looks OK. But in OS X, QToolBar have terrible gradient as its background. Please, suggest me, how I can remove it?
UPD.: I'm using Qt 5.2.

Yurij
- 1,530
- 16
- 30
1
vote
0 answers
QToolBar in MDI child
I've got an MDI application where I'd like to create the movable toolbars in the MDI children. Adding a toolbar to the MDI children's layout makes it unmovable. Making the MDI child a subclass of the QMainWindow allows adding nice movable toolbars…

VVV
- 499
- 4
- 12
1
vote
1 answer
Qt centralwidget toolbar splitter
I am working on a Qt project based on QMainwindow having left and right toolbars. What is the better way to add splitter between QMainwindow and toolbars. As in Qt creator we have splitters between code editor and other panels.
Central widget, right…

criticalboot
- 25
- 4
1
vote
2 answers
Toolbar layout with Qt Designer
I use the Qt Designer to design .ui files and compile them in my VS-Project.
We have a Toolbar class, derived from QToolbar.
Class initialization looks like this.
MyToolBar::ToolBar(QWidget* qWidgetParent) :
ToolBar(qWidgetParent),
…

norca
- 138
- 1
- 14
1
vote
2 answers
On Qt, how to change the icon of an action in the toolbar at runtime?
In a program which calculates abritary precision numbers.
I have an action on the taskbar.
QAction* button_stop_continue.
I've set the icon green icon in the beginning of the program, when calculations are being executed it should turn red and so…

Marc SJ
- 711
- 8
- 12
1
vote
2 answers
How can I customize the appearance of the actions in my QToolBar?
I have just changed some toolbars from Q3ToolBars (with QToolButtons explicitly added to them) into Q4 toolbars (with actions added to them straight away instead.)
The old tool buttons had a nice outline around them, but this is not displayed in…

norman
- 5,128
- 13
- 44
- 75
0
votes
0 answers
Python Qt QToolbar overflow button edit
I want to edit the overflow button of a python qt qtoolbar so that it doesn't closes automatically when I move my cursor of it. I want to click the overflow button again to close it
I am not an expert and I did not find anything about this topic

botikis
- 1
0
votes
1 answer
Qt: Remove space between QToolBars
In the code below, you see two toolbars. Each toolbar has two buttons (1.1, 1.2 and 2.1, 2.2). You will notice a space between the toolbars, that grows, as you drag the horizontal window size.
I want to get rid of this space. I want the inner…

KungPhoo
- 516
- 4
- 18
0
votes
0 answers
Setting a QSS style on all QToolButtons in an application except the ones inside a QToolBar
The application I am working on uses QToolButtons as simple elements in a layout and as QActions added to QToolBars. I would like to apply a style on all the QToolButtons in my application except the ones within a QToolBar.
I saw that I can set a…

sajas
- 1,599
- 1
- 17
- 39
0
votes
0 answers
How to resize focus area of a QToolButton?
I've got a QToolbar with QToolButtons. The buttons receive focus with a manual ->setFocus(). However I need the focus marking area (blue) to be expanded to the size of the full area as while hovered.
Is there a way to do that?
Hover + focus
Focus…

Mykola Tetiuk
- 157
- 3
- 9
0
votes
0 answers
Adding checkable QToolButton to QToolBar with an icon, a text and a menu
Currently, I have a QToolBar with different checkable actions grouped in QActionGroups set to autoExclusive. This works well.
Now, I would like to have one QAction with a menu so that user can choose the behavior of this action. So I decided to use…

zigma12
- 181
- 1
- 7
0
votes
0 answers
PyQt5 QMainWindow | Returning to Main Window (Dashboard/Home Screen) Using QToolBar Button
I am using a QToolBar for Navigating from page to page. Obviously I am using QMainWindow. The first issue I had was getting QWidgets/layouts on the QMainWindow. I was able to solve this issue with the solution used for this StackOverflow…

grippnault
- 31
- 6
0
votes
1 answer
How to add tool bar at the top in QDockWidget?
I am trying to create tool bar at QdockWidget. But the icons in tool bar are not getting placed at proper position. They should come just below the title.
QWidget* placeholder = new QWidget();
QBoxLayout* toolLayout = new…

tushar
- 313
- 4
- 10
0
votes
1 answer
toolbarBreak disappears when deleting QToolBar
When I execute the following example code, I first create two toolbars with a break between it and then I delete the second toolbar after that. The problem is that the toolbarBreak also disappears when I do that.
When I reinitialize t2, there is no…

easysaesch
- 159
- 1
- 14
0
votes
1 answer
How do I make the matplotlib toolbar able to dock to the side in a pyqt5 window?
I have embedded a matplotlib figure in a pyqt5 window along with the toolbar, this is my code:
from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg…

Vinzent
- 1,070
- 1
- 9
- 14