Questions tagged [qkeysequence]

The QKeySequence class, part of the Qt framework, encapsulates a key sequence as used by shortcuts.

In its most common form, a key sequence describes a combination of keys that must be used together to perform some action. Key sequences are used with QAction objects to specify which keyboard shortcuts can be used to trigger actions.

20 questions
1
vote
1 answer

Qt: how to apply a shortcut( Key_Comma + Key_Return) to action

I tried to set a shortcut by the following code, but it doesn't work. If I change it to ALT + Comma or ALT + Return, it will be fine. but the request is Comma + Return. Does anyone know how to set this special shortcut on Qt? @shotcut =…
Alex Tsai
  • 11
  • 1
1
vote
1 answer

Qt C++ Error no matching function for call to 'QString::QString(KeySequence)'

I used Qt 4.8.4 for my GUI-Project written in C++. Now I merged to Qt Version 5.7. After a long process of adapting my code I finally got my GUI to open. But when I run my calculation-code I still get this Error: no matching function for call to…
user3443063
  • 1,455
  • 4
  • 23
  • 37
1
vote
2 answers

Qt Creator - Add keyboard shortcuts to Menu entries

I created the shortcut events, such as: new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this, SLOT(close())); But now I would like to show "Ctrl+Q" in the menu entry here: How do I do that? I don't seem to find a way to do that in Qt Creator.
Nuno
  • 3,082
  • 5
  • 38
  • 58
0
votes
1 answer

Propagate keyEvent from widget to QKeySequenceEdit

I have a QTreeWidget and QKeySequenceEdit and I want pressing shortcuts in QTreeWidget lead to editing shortcut in QKeySequenceEdit. I've installed eventFilter and constructed the corresponding QShortcut using this solution: How can I capture…
Bearded Beaver
  • 646
  • 4
  • 21
0
votes
2 answers

Global short cut key for a QPushButton

How could I register a global short cut key for a certain QPushButton? Especially when the QPushButton is not a direct child of the main window.
Nyaruko
  • 4,329
  • 9
  • 54
  • 105
1
2