The QMenuBar class, part of the Qt framework, provides a horizontal menu bar.
Questions tagged [qmenubar]
84 questions
3
votes
2 answers
Qt: Change application QMenuBar contents on Mac OS X
My application uses a QTabWidget for multiple 'pages', where the top-level menu changes depending on what page the user is on.
My issue is that attempting to re-create the contents of the menu bar results in major display issues. It works as…

syrius
- 31
- 1
- 6
2
votes
1 answer
How to add QMenuBar to QWizardPage?
I am trying to add a QMenuBar to QWizardPage
QMenuBar *menuBar = new QMenuBar;
menuBar->setNativeMenuBar(false);
QMenu *helpMenu = new QMenu;
QAction *helpAction = new…

Mahesh Jagtap
- 128
- 9
2
votes
2 answers
Displaying image below menubar in PyQt
I have a simple flow: user clicks a button, a QDialog popup appears and I wish to render a MenuBar and an image below the MenuBar (the rendering happens during the paintEvent).
import sys
from PyQt5 import QtGui
from PyQt5.QtGui import QPixmap
from…

Kristijan
- 195
- 10
2
votes
1 answer
Menubar created by PyQt Designer
i designed in PyQt-Designer a surface and converted it to a .py
No I´m trying to link a function to a menubar-(button). There is something like open, save, close....
I have tried a lot, but unsuccessfully, i hope you can help me to connect a simple…

D.Stang
- 23
- 5
2
votes
1 answer
QMenu displays incorrectly when setParent called
I want to create a function to build a context menu that can be dynamically added to a window's menubar. Consider the following minimal example for adding a simple QMenu:
from PyQt5 import QtWidgets
class MainWindow(QtWidgets.QMainWindow):
def…

user3419537
- 4,740
- 2
- 24
- 42
2
votes
2 answers
Qt adding non-menubar keyboard shortcut to QMainWindow
I have a custom widget that extends QMainWindow. There I am adding a number of QActions to the menu bar, along with keyboard shortcuts for each, and they work fine. Now I want to remove some of those actions from the menubar, but I want to keep the…

SexyBeast
- 7,913
- 28
- 108
- 196
2
votes
1 answer
Set QMenu on TopRightCorner in a QMenuBar
can someone explain why this statement does nothing?
ui.menuBar->setCornerWidget(ui.menuHelp, Qt::TopRightCorner);
menuBar is a QMenuBar and menuHelp is QMenu
I still get all my QMenu's clustered on the Left Side of the window

BurninatorDor
- 1,009
- 5
- 19
- 42
2
votes
3 answers
PyQT4 QMenuBar Visibilty toggled by MouseOver
I got a problem which is driving me insane.
I want to make the QMenuBar only visible when moused-over, else it should be hidden.
So far i got this to "work":
class Hidden_Menubar(QtGui.QMenuBar):
def __init__(self, parent=None):
…

ViGi
- 140
- 1
- 11
2
votes
1 answer
How to Hide Right Arrow in QMenu in Qt?
Can anyone please tell me how to hide the right arrow for the QMenu items. I tried using the stylesheet. But it didn't works.. Please Help.
MyStylesheet.qss
QMenu::right-arrow[hide="true"]
{
image: url(Resources/MenuRight.png); //am using an…

New Moon
- 787
- 6
- 21
- 35
1
vote
2 answers
Put QMenuBar at QMainWindow Bottom in QT
Is there any way to put a QMenuBar at screen bottom (I mean, at QMainWindow bottom)?
I'm working on my thesis project, and my director asked me to put a QMenuBar at screen bottom. Is this possible?, I have been trying adjusting the menubar geometry.…

Hermandroid
- 2,120
- 4
- 29
- 35
1
vote
0 answers
How to add a text with MultiColor in PYQT5 QMenubar?
I Need to create a menubar with multicolour text. For example, In My menubar, My first item name is "File", The first letter of the Item name is in red colour and the remaining letters are in some other different colours. For a More Clear cut Idea,…

tckraomuqnt
- 470
- 4
- 17
1
vote
1 answer
QLineEdit setCornerWidget width
I'm adding a QLineEdit to the menu bar with setCornerWidget. However, when setting a size with either setFixedWidth or setMinimumWidth, the QLineEdit is clipping through the window:
class MainWindow(QMainWindow):
def __init__(self):
…

Vic
- 139
- 8
1
vote
1 answer
How to force QMenuBar to have the same background color as QToolBar
My menu bar is placed inside my toolbar :) And I wan't both of them to have the same background color. In some color themes menubar background is different then in toolbars (lighter). How do I sync them and at the same time maintain current theme…
user666491
1
vote
1 answer
Add more than one Qmenu from other classes in MainWindow
I want a single menubar in my main window and be able to set the menus in the menubar from additional classes. Using the setMenuWidget command will overwrite the first menu option as shown in the code. In the classes where I set up the menu I think…

anthony crimin
- 29
- 6
1
vote
1 answer
PyQT5 when we click an object to a menu bar we want to open a new window
Two days ago, i begun to study python in order to develop a lesson project. With my team we wrote the code bellow. Is a simple first screen with one image, two labels and a menu bar.
import sys
from PyQt5.QtWidgets import QMainWindow, QApplication,…

A Damian
- 91
- 1
- 8