Questions tagged [qaction]

The QAction class, part of the Qt framework, provides an abstract user interface action that can be inserted into widgets.

Documentation can be found here

145 questions
0
votes
2 answers

How to make toggle-able QAction

Is there a way to make QAction stay down after it is clicked. Ideally it could toggle between two states: On (down) and Off (up)?
alphanumeric
  • 17,967
  • 64
  • 244
  • 392
0
votes
1 answer

What am I doing wrong when making this shortcut?

I'm using QT and I have a QAction, which I want to use Cmd and Plus as a shortcut to zoom in. I've found out that QKeySequence::ZoomIn will map to that, and other native key combinations for zooming in on other types of keyboards. I've used the code…
Jon
  • 495
  • 2
  • 9
  • 22
0
votes
1 answer

Qt 5.7 QFileDialog action doesn't work

I got filedialog called inside my main window with this code: QAction *actionWithShortcut = new QAction(); actionWithShortcut->setShortcut(Qt::CTRL +…
htzfun
  • 1,231
  • 10
  • 41
0
votes
0 answers

How can I get the QMenu and QActions from a QwtPlot

I have a QwtPlot widget that shows a QMenu with some QActions when the user clicks on it with the right mouse button: Now, I need to implement an automated function to test it. How can I get access to the QMenu and QActions from the QwtPlot…
KelvinS
  • 2,870
  • 8
  • 34
  • 67
0
votes
0 answers

Preventing Qmenu's auto disappearing by show() slot

I'm developing a gui application with Qt 4.6.3 on Windows platform.In the app, Qmenu has a submenu and after ı clicked this submenu's QAction the main menu is disappearing.For preventing this, ı used something like…
ACrescendo
  • 46
  • 10
0
votes
1 answer

How to change the icon of a QAction Qt on mouse hover in QToolBar element in qt?

I have some QActions in my QToolBar. QAction doesn't have any stylesheets, so I am trying to change the QAction icon on mouse hover. how can I change the QAction icon on mouse hover
Rishabh Bansal
  • 51
  • 1
  • 1
  • 9
0
votes
0 answers

How to set Icons through Style sheet to each QActions, which are added to one QToolButton?

I have added 3 QActions to one QToolButton. And this QToolButton is in a QToolBar. like this: toolButton = new QToolButton(); action1 = new QAction(tr("Action 1"),this); action1->setObjectName("obj_action1"); …
jung
  • 557
  • 2
  • 4
  • 16
0
votes
1 answer

Retrieve corresponding QStandardItem when rightclicked (contextMenu) on QTreeView

I have a QTreeView with names. I added a contextMenu as here: _treeMenu = new QMenu(myTreeView); _editTreeViewAction = new QAction("Edit Selection", _treeMenu); _deleteTreeViewAction = new QAction("Delete Selection",_treeMenu); …
Ralf Wickum
  • 2,850
  • 9
  • 55
  • 103
0
votes
2 answers

Add QAction to the QMenuBar dynamically outside of window constructor (get access to ui generated in Designer from another file)

How can I add some action to the QMenuBar outside of window constructor? I have got some ui_menu.h file created in QtDesigner with QMenuBar: #ifndef UI_MENU_H #define UI_MENU_H #include #include #include…
0
votes
0 answers

Force QMenu to close

Due to some reasons I need to implement specific menu in QToolBar. My target is to save the default design of a button with drop-down menu (icon + triangle), but I want to show my own QDialog (it looks like a tree) when I press this triangle. So,…
tema
  • 1,115
  • 14
  • 33
0
votes
1 answer

QAction parent menu

How to get parent menu of a given QAction? I have a QActions added to submenus. Is there any way to know parent menu name of each action? ui->action567->parent() //return MainWindow ui->action567->parentWidget() //return…
user1590232
0
votes
2 answers

Improve existing code using QActions in an object way

An existing code implements some QActions within a QToolbar as in picture. The purpose is to make the selected Qaction's icon blinking. Therefore, according to Wizard_Step - a class member- the dedicated QAction has its icon changed alternatively…
dlewin
  • 1,673
  • 1
  • 19
  • 37
0
votes
1 answer

Subclassing matplotlib NavigationToolbar throws error with Pan / Zoom

I'm developing a GUI based filter design and analysis tool (https://github.com/chipmuenk/pyFDA), subclassing matplotlib NavigationToolbar to implement some changes (added / deleted functions and buttons, new icon set). The full code is available…
Chipmuenk
  • 607
  • 1
  • 7
  • 22
0
votes
1 answer

Having a QToolButton w/ Menu being checked if any of the checkable QActions within that menu is checked

Say I have a QToolButton with a delayed action showing a menu. Said menu contains a number of checkable actions. In this particular case it's a button activating a zooming tool, and there are 3 zooming modi QActions available, organized in a…
datenwolf
  • 159,371
  • 13
  • 185
  • 298
0
votes
1 answer

Warning is shown when hovering mouse over QToolButton actions

I have made a QToolButton with some actions like : QToolButton * toolBut1 = new QToolButton(this); actionGroup1 = new QActionGroup(this); actionGroup1->setExclusive(true); action1 = new QAction(QIcon(":/images/icon1"),"",…
Ali Mofrad
  • 308
  • 5
  • 21
1 2 3
9
10