qmenu Questions

5

Solved

I'm trying to build a menu with some items that are not interactive in QT. I subclass QMenu in my MyCustomMenuClass. I'm trying to add section titles to my menu so that it's clearer for the user. ...
Radome asked 25/3, 2014 at 13:21

3

I'm working on a Qt application (in C++). Without appyling any styles, my menu looks like this: I'd like it to look like this: How do I achieve this? Either using qss, or programmatically? I...
Giraldo asked 25/6, 2017 at 10:30

3

I have built up a QMenu MainMenu on top of my MainWindow in my application. As everybody is used to it, I have following QMenu Main menus: File - Edit - SuperHeavyExpertMenus - Settings - Help ...
Salep asked 3/9, 2015 at 12:30

4

I am wanting to have a toolbar in Qt that contains either QActions or QToolbarButtons that have popup menus attached to them. I have been able to do this perfectly in the code by creating a QMenu, ...
Mosqueda asked 18/7, 2011 at 23:47

3

Solved

How can i make my qmenu checkable? from PyQt4 import QtGui app = QtGui.QApplication([]) menu = QtGui.QMenu() menu.addAction('50%') menu.addAction('100%') menu.addAction('200%') menu.addAction('...
Imprimis asked 29/4, 2012 at 1:20

2

My application has a QMenuBar with a number of QMenus, each of which having a number of QActions and sub-QMenus. Most of the QAction-items are derivatives of QWidgetAction with re-implemented QWidg...
Dongdonga asked 10/3, 2019 at 9:59

1

Solved

I have a few actions in a QMenu that I'm trying to connect to a single method; there are additional actions that are unrelated. import sys from PyQt5.QtWidgets import * class Window(QWidget): ...
Haskel asked 26/9, 2018 at 21:8

3

Solved

Is there a way in Qt to add a layout or widgets to a QMenu to create a custom menu? The example below (left) is what I have, and I'd like to aim for something similar to the mock-up on the right, ...
Kaput asked 13/9, 2013 at 13:21

3

Solved

First, I have a list of QWidgets that I won't know the length of until runtime. I then create a QListWidget where I show them and when someone clicks them I use the signal currentItemChanged(QListW...
Towrope asked 8/2, 2012 at 3:36

3

Solved

I am writing a popup menu for a Qt push button widget. Whenever the push button is clicked, a menu pops up (below the push button). The popup menu is left-sided below by default. Are there any w...
Skimp asked 28/7, 2015 at 6:14

4

I'm working in a project where I need to open (show or popup) automatically the items in the QMenuBar. Let's say I have the next menu bar: File Edit Help -op1 -op1 -op1 -op2 -op2 -op2 To set ...
Portuguese asked 22/2, 2012 at 17:24

4

Solved

I am trying to make the menubar a gradient black colour and that works fine, except for the menu headings. Here's the stylesheet i'm using: QString styleSheet = "QMenuBar{background: qlineargrad...
Selinaselinda asked 2/1, 2012 at 21:44

2

Solved

I want to be able to show ToolTips for QMenu items (QActions). The best I have achieved is to connect the hovered signal of the QAction to a QTooltip show: connect(action, &QAction::hovered, [...
Darbie asked 27/11, 2014 at 0:18

4

Solved

I'm doing an app with in GUI written with PySide. I set a QMenu on a QPushButton, added several QActions via QMenu.addAction. To further explain these actions to the user I added QToolTip's to thes...
Ladd asked 12/2, 2014 at 10:25

1

I have a QMenu with a translucent background and rounded edges (border-radius). Unfortunately, Windows 7 draws a drop shadow for this menu, which does not fit to the rounded edges. Its the shadow t...
Quartile asked 2/10, 2012 at 13:45

2

Solved

I have a QAction in QMenu. When QAction is triggered() I would like to know which button did it. connect(YourAction, SIGNAL(triggered()), this, SLOT(actionclicked())); void MainWindow::actioncli...
Dermoid asked 6/8, 2016 at 11:36

2

I need to create a menu that changes the background of a QWidget. I'd like to place a QIcon that represents the selected color into the QActions which populates the QMenu. I'd like to not have to p...
Irritation asked 12/11, 2012 at 19:58

1

Solved

My goal is to make menu with labeled separators. So, I am running this code: QMenu *menu = new QMenu; QAction *group1 = menu->addSeparator(); group1->setText("Group of actions #1"); m...
Joliejoliet asked 22/6, 2016 at 19:28

1

I have created a context menu in Qt and I need the items in the menu works in a checked/Unchecked manner so that it toggles for every click on the respective item. How to add this feature to the QA...
Moro asked 22/11, 2012 at 5:5

1

Solved

I have pretty specific situation. I want to place a QAction into QToolbar and reach following behaviour: Checkable QAction with icon. Classic arrow on the right side which is used for showing men...
Mam asked 1/9, 2015 at 13:43

1

Solved

I want to build a dropdown list control with QPushButton and QMenu like below: QPushButton* menuBt = new QPushButton("Please select"); menuBt->setFlat(true); QMenu* menu = new QMenu(); menuBt-&...
Peg asked 14/7, 2015 at 6:49

3

Solved

Still learning how pyqt works. I want to dynamically generate a customContextMenu and connect with a function. So far I got the following but the connect part not working ? import sys from PyQt4 i...
Vineyard asked 5/12, 2013 at 2:35

2

I am attempting to add an icon to my QMenu using Qt Designer, however I realized that my text disappears when my icon is added. Is there any way for me to show my icon next to my text?
Hamza asked 17/9, 2013 at 4:6

2

Solved

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...
Joist asked 23/9, 2014 at 21:13

2

Solved

Currently I have QMenuBar with three QActions and it looks like this: but I would like to get this (get some QActions right-aligned): Is there a way to do this?
Absa asked 4/1, 2012 at 12:11

© 2022 - 2024 — McMap. All rights reserved.