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
0
votes
1 answer
Move widget with cursor to another layout
I want to simulate QDockWidget/QToolBar behavior for custom widget, unpin widget with mousePressEvent from one location and pin it to another location. Like place upper frame to 'sub' location:
I'm able to unpin it with the following code:
class…

JuicyKitty
- 318
- 1
- 16
0
votes
2 answers
Can't move toolbar from top/bottom to left/right and vice versa
Just learning how to deal with QToolBar and figured out that can't change orientation by drag&dropping it.
mainToolBar = QToolBar(self)
mainToolBar.setContextMenuPolicy(Qt.PreventContextMenu)
mainToolBar.setFloatable(False)
As you can…

JuicyKitty
- 318
- 1
- 16
0
votes
2 answers
How to add a QToolBar inside a QTabWidget
I have been trying to add a QToolBar inside a QTabWidget in order to achieve something like the image below, so that everytime I add a new QTabWidget I have also a related QToolBar inside it.
Everything seems to work fine, I create a QAction to…

Emanuele
- 2,194
- 6
- 32
- 71
0
votes
1 answer
Put QpushButton into drop down menu if window/toolbar size/width is reduced
I have a QToolBar full of QPushButtons. As the window is resized to reduce its width, the width of toolbar is reduced. If the width is reduced beyond a certain point, the buttons starts disappearing. I think the situations is understood.
There are…
user11103713
0
votes
1 answer
Position of icons in vertical QToolbar when switching between Qt::ToolButtonIconOnly and Qt::ToolButtonTextBesideIcon
When switching between Qt::ToolButtonIconOnly and Qt::ToolButtonTextBesideIcon in a vertical QToolBar, there is a slight shift of the icon to the right when expanding the toolbar:
Is it possible to get steady icons, which do not shift to the right…

elsamuko
- 668
- 6
- 16
0
votes
1 answer
How can i styling PyQt5 QToolBar item?
I writting an application with python and PyQt5. I want to styling QToolBar Items with Qt StyleSheet but I can't. I use setStyleSheet metod to do this. I want to set padding for QToolBar Items.
this is my code:
from PyQt5.QtWidgets import…

MSKF
- 25
- 8
0
votes
1 answer
How to disable extension button in QToolBar?
I would like to know how to disable extension button in QToolBar, which appears as the last item in the toolbar, when a toolbar is too small to show all the items? I've trying through find child method, but that doesn't work.

Dislau
- 1
0
votes
1 answer
Is it possible to style a checked QToolButton using QSS?
Obviously, this applies only to checkable QToolButtons.
The light blue background and border isn't as nice on my app as a light red background. (The code below has red background just as an example.)
I've tried:
QToolButton:pressed {
…

Osama Kawish
- 312
- 1
- 5
- 15
0
votes
0 answers
Why does my toolbar dock to the incorrect location?
I have a weird scenario. I create a QMainWindow that is embedded in a QGraphicsScene. I want to have multiple QMainWindows each with a toolbar inside the scene. I'm simulating an MDI Area, without using the QMdiArea class.
Here is the…

JComputerScience
- 155
- 13
0
votes
1 answer
How to fix Qt QMainWindow's Draggable Area Issue with QToolBar in QGraphicsScene
I'm facing a strange issue when trying to add a QMainWindow to a QGraphicsScene. For all intents and purposes, please do not recommend me to use the QMdiArea as the alternative, because that distracts away from the actual issue I am having and it…

Blanky
- 63
- 9
0
votes
0 answers
Dynamically call function by pressing a button with different input values
I have a main window with a toolbar. I also have a class that handles actions and a class that has all the actions. Here is my code:
import sys
from PyQt4 import QtGui, QtCore
buttonActions = ['actA', 'actB', 'actC']
img =…

ioaniatr
- 277
- 4
- 15
0
votes
2 answers
Put a QToolBar in a QWidget instead of QMainWindow
I am trying to put a QToolBar on a layout of a QWidget instead of QMainWindow. On QMainWindow and QWidget is working fine, but when i try to add it on a layout first, is not. Am I doing something wrong? Is it possible? Here is my code:
from PyQt4…

ioaniatr
- 277
- 4
- 15
0
votes
0 answers
PyQt Toolbar Triggered
I can't understand this
tb.actionTriggered[QAction].connect(self.toolbtnpressed)
on here actionTriggered[QAction] <- what is this ? it's a list ?

Mert Sis
- 1
0
votes
1 answer
Qt Toolbar animation based on opacity
Toolbar(SelectionToolBar) is allowed LeftToolbarArea. and is presently hidden. When i take the mouse to the left border of the application, it will come with animation defined on opacity. This is working fine. But the problem is when I move over the…

V. Purbia
- 57
- 5
0
votes
1 answer
PyQt5 ToolBar onclick function
I am a beginner in python and I want to start with a simple GUI.
I use PyQt5 for gui development.
I want run itWorks() if the user click the Login Toolbar Button.
Here is my code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
from…

imaher0
- 9
- 3