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
1 answer

Remove tooltip of QAction when add it to QToolBar in Qt

I added a QAction on a QToolBar, but I can't remove a tooltip from the button. I tried to overide event, eventfilter using event->type == Qt::Tooltip but it didn't help. Please help me.
Hien Ngo
  • 253
  • 5
  • 18
0
votes
2 answers

Qt - open dialog when action triggered multiple times

I want a notice dialog to come up when an action has been triggered multiple times consecutively (so basically a bit like how StickyKeys is enabled). I understand that I can basically do connect(this->trigger, SIGNAL(triggered()), this,…
islandmonkey
  • 15
  • 1
  • 1
  • 7
0
votes
1 answer

QT: signals from QMenu and QAction

My problem is to make a menu to load files. Here's my code: QStringList fileNameList; fileNameList << "file1" << "file2" << "file3"; QMenuBar *menubar = new QMenuBar(); QMenu *menu = menubar->addMenu("File"); QMenu *load =…
awfun
  • 2,316
  • 4
  • 31
  • 52
0
votes
1 answer

How to use QSignalMapper for a list of QAction items

I am developing a code snippet to perform similar, not identical actions when I click on the sub menu item list. Please check the attached snapshot. QSignalMapper is the best solution to connect multiple signals to the same slot. But I am not able…
cappy0704
  • 557
  • 2
  • 9
  • 30
0
votes
1 answer

How to use qAction submenu in Qt

I want to implement simple commands like a qDebug() when I click on a sub menu in the mainwindow. I was referring to sample program given along with the Qt 5 IDE (...\Qt\Qt5.2.0\5.2.0\msvc2010\examples\widgets\mainwindows\menus), and using it, I…
cappy0704
  • 557
  • 2
  • 9
  • 30
0
votes
1 answer

How to insert an action in a menu with Qt Designer?

It is convenient to add actions to a menu with QtDesigner by typing some texts in the "Type Here" box. However, the "Type Here" box is always at the below. How to insert an action at a particular position, for example, under or above the existing…
user1899020
  • 13,167
  • 21
  • 79
  • 154
0
votes
2 answers

Connect slots QAction dynamically to a function

I want to add some QAction dynamically from settings file : _settings.beginGroup("openRecent"); QStringList recentList = _settings.childKeys(); foreach(QString recentFile, recentList) { QAction * action = new QAction(_settings.value(recentFile,…
Thomas Ayoub
  • 29,063
  • 15
  • 95
  • 142
0
votes
2 answers

Qt - Send key press event to GLWidget from a QMainWindow

I have a Qt/OpenGL/OpenCL application with a QMainWindow containing a GLWidget subclass widget. I would like to add zoom functionalities (with key press) on the GLWidget from the menu of the QMainWindow. Originally, I did zoom In/Out directly from…
user1773603
0
votes
2 answers

QToolButtons Not-Flat Button Style

I am using Qt Widgets version 4.8. I am placing QAction objects into a QToolBar. I am displaying text only, no icons. The text appears flat with no outline, until one hovers over the text, and then the text appears as a button. I would prefer to…
JeffB
  • 1
  • 1
-1
votes
1 answer

Open Image & Draw on it

I'm trying to create an application with functionality similar to MS paint using Python 3.8. However, I am unable to upon up the image in the MainWindow. This is the code that I have so far: from PyQt5.QtWidgets import QMainWindow, QApplication,…
John_Doe
  • 95
  • 1
  • 11
1 2 3
9
10