Questions tagged [qmenubar]

The QMenuBar class, part of the Qt framework, provides a horizontal menu bar.

Documentation can be found here (Qt4) and here (Qt5).

84 questions
1
vote
1 answer

MenuBar cannot be clicked

I'm trying to learn PyQt5 and currently and making a MenuBar with an Exit function and an Open function. I currently have the MenuBar showing with shortcuts that work, but I cannot click on the MenuBar when I hover over it. Here is my current…
TheStrangeQuark
  • 2,257
  • 5
  • 31
  • 58
1
vote
1 answer

Adding submenu in QMenuBar

I have a simple GUI with QWidget as my main class and I need to create a submenu like this: when i try using QMenuBar the result is like this: How can i create submenu like the first picture? Should I change my main class to QMainWindow if I want…
zNed
  • 11
  • 5
1
vote
1 answer

QAction not triggered for added QMenu

The issue that I'm facing is when I want to split the functionality of the menubar into multiple files (classes), each of them specific for handling options (File/Help/Edit and so on). In the Main UI class I have: class MyFrame(QMainWindow): …
Bogdan
  • 349
  • 1
  • 4
  • 15
1
vote
1 answer

Qt and native menus

Does Qt support interaction with the native menu bar of an arbitrary window (i. e. QWidget) on Windows and Linux? It looks like Qt treats the menu as just another child widget to be placed on the parent window. That is, to have a menu bar , I must…
Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
1
vote
0 answers

Qt MenuBar highlight border with motif style

I have a QMenuBar with two sub menus using the motif style (Qt 5.3). A black border appears around the QMenuBar when following this scenario (example code below): Click sub menu "Foo1" Click sub menu "Bar1" The border appears after clicking on…
softs
  • 11
  • 2
1
vote
1 answer

PySide MainWindow doesn't create Menu Bar

I'm trying to create a menuBar on a MainWindow widget, but after writing the code I found on the internet, nothing seems to happen, the Menu Bar isn't created, even though no error message is displayed. The code I use to create the UI with the menu…
Gustavo Amgarten
  • 396
  • 4
  • 20
1
vote
1 answer

How do I create one menu for an entire Qt application?

My application can launch multiple instances of QMainWindow, and I would like each instance to have the same menu. If there are no instances initialized but the application is still running (possible on Mac OS X), I would still like the same menu…
Joey Kleingers
  • 297
  • 1
  • 4
  • 13
1
vote
1 answer

Qt: How to add custom menu items in Application Menu in Mac?

I want to add a submenu in the application menu in Mac. The Application Menu already contains item "About myapp", "Quit myapp", etc. I want to add here a sub menu like "Themes" and then provide actions inside it like: "Theme 1", "Theme 2", etc. So…
user2653062
  • 697
  • 1
  • 9
  • 16
1
vote
1 answer

Move QMenuBar in QToolBar

I have a QToolBar and QMenuBar. The QMenuBar has only one menu item (as I made it), so the line of QMenuBar is almost blank. I want to make the QMenuBar to take part of the QToolbar, because it has only one item. Is there any option to do…
MM PP
  • 4,050
  • 9
  • 35
  • 61
1
vote
1 answer

How to prevent clipping of cornerWidget in QMenuBar

I'm writing newbie Qt5(.4.0) code on OSX Mavericks. Here's my self-contained test case: #include #include #include #include #include #include int main( int argc, char…
lcikgl
  • 759
  • 1
  • 8
  • 20
1
vote
1 answer

Align QMenuBar in Python

I have to align 'Menu5' to the right side of MenuBar. Is that possible in Python? (PyQt4) Example I found information on how to do this in C there Aligning QMenuBar items (add some on left and some on right side) But I don't know how I can do this…
Adam
  • 108
  • 2
  • 11
1
vote
1 answer

How to add a menubar to a QFrame with QtDesigner?

I have created a QFrame with Qt designer, and now I'm trying to add a menubar. So far I have seen that I maybe should have used QMainWindow but I can't change the type anymore and I don't see any option to attach a menu. I have tried to create an…
Devolus
  • 21,661
  • 13
  • 66
  • 113
1
vote
0 answers

How to give color to a particular text in the Qmenu Bar

I am setting the title of the one the menu option as mentioned below: QString Str = "User Profile: " + loFile.baseName(); m_titleBar->m_UserProfileMenu->setTitle(Str); Here my requirement is, I need to change the font color of the text…
Bharathi
  • 337
  • 1
  • 5
  • 17
1
vote
2 answers

How can I create close button on Menu bar?

In the picture below, the red rectangle is the menu bar. I want to create close button where the green rectangle is, but I don't know how can I do that. Any suggestions? I'd like to make the UI look like Adobe Photoshop CS6?
delio
  • 91
  • 1
  • 2
  • 9
1
vote
0 answers

Can anybody tell me When is the QMenuBar::hovered(QAction*) signal emitted in Apple iMAC system?

Hi I am working on a Qt GUI project in a iMAC system, in which I have a QMenuBar, I am trying to connect the QMenuBar hovered signal to a slot, the lines are given below menuBar = PluginLocalManager::getInstance()->getMainWindow()->menuBar(); bool =…