Questions tagged [qkeyevent]

The QKeyEvent class, part of the Qt framework, describes a key event.

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

73 questions
0
votes
1 answer

Qt keyPressEvent Error

I wrote this piece of code, but I get this error: "left of '->key' must point to class/struct/union/generic type". Considering that GUI is a class derived from the QWidget class, how can I properly catch the pressing of a key? void…
Ana
  • 3
  • 1
  • 5
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

QKeyEvent isAutoRepeat not working?

So, I have an application where if a particular button is kept pressed it plays an audio device, when the button is released it stops the audio device. I use keyPressEvent and KeyReleaseEvent to implement this which is similar to the code…
the_naive
  • 2,936
  • 6
  • 39
  • 68
0
votes
0 answers

Selective keyPressEvent, filter for its sender QLineEdit

I've created a QWidget, which contains three QLineEdits. Then I added a overwrote the keyPressEvent so that this lineEdit_3 reacts on key press. Working good. void MySuperWidget::keyPressEvent(QKeyEvent* keyEv) { switch (keyEv->key()) { case…
Ralf Wickum
  • 2,850
  • 9
  • 55
  • 103
0
votes
1 answer

symbol lookup error: /usr/lib64/qt5/plugins/platforms/libqxcb.so: undefined symbol: xkb_state_key_get_utf8

while migrating my application from Qt4.7 to qt5.3 i made all the changes needed in the code according to qt5 my applications started but when i tried to login.. the application closed and it did not crashed rather it stoped with this error …
Deepti
  • 119
  • 4
  • 12
0
votes
1 answer

Move an item in a scene Qt

I try to move an item in a scene and for that, I use QKeypressEvent and moveBy that works both perfectly but I'd like to recover the "key press event", so I decided first, to use a boolean that returns true when the key is pressed and false when…
Ary
  • 128
  • 1
  • 1
  • 11
0
votes
1 answer

Qt embedded processes not all keys

I use Qt Embedded and I have a board with some keypad. I use eventFilter and check for QKeyEvent for my widget, but for only two buttons Qt doesn't react to. eventFilter isn't called. Here is code: bool eventFilter(QObject* parent, QEvent* event) { …
Bikineev
  • 1,685
  • 15
  • 20
0
votes
2 answers

Permanently disable shift in Qt when the GUI is running?

I'm using a QTableView where I show a list of Icons, the user can select some icons with mouse and control key button, and I'm able to handle these selections. But I want to disable the use of shift+left mouse key over the QTableView. Is there any…
the_naive
  • 2,936
  • 6
  • 39
  • 68
0
votes
2 answers

How to merge KeyReleaseEvent with Button

How to merge KeyReleaseEvent and QPushButton using signal. I mean whenever user will press enter key button should call some function using SLOT. So what i have to use in the signal? void mywindow::keyReleaseEvent(QKeyEvent *event) { …
Suresh
  • 745
  • 4
  • 11
  • 25
0
votes
1 answer

how to hinder the short waiting time while pushing a button?

I made a program which moves an QGraphicsPixmapItem with QKeyPressEvent(I am using ASDW to move the item) and my problem is when I push the button without releasing my item does not move smoothly. Just like writing AAAAAAAAAAAAAAA without releasing…
bcdurak
  • 1
  • 1
0
votes
1 answer

Qt - How to Use Key Pressed Event for a LineEdit which accepts only the Integers

I'm a new bie to Qt C++.. I have a QLineEdit. In which i have to Enter only the integers. If i press an Alphabet or any any other character my QLineEdit should not accept it. How to do this in qt with C++? Please Help To solve this.
New Moon
  • 787
  • 6
  • 21
  • 35
0
votes
1 answer

VNC: Translate Qt KeyEvent to usable X11/RFB keysym

Background: I am currently in the process of creating a simple VNC viewer embedded in a QWidget for use on Windows. For this, I compiled the Qt-only VNC version of KRDC (remote desktop viewer for KDE) as well as its dependency libvncclient on…
Ancurio
  • 1,698
  • 1
  • 17
  • 32
0
votes
1 answer

In a QWizard, the next button cannot accept key press event, but accepts mouse press event?

I have a class inherits QWizard, and add 2 independent QWizardPage(s). Before go to the next page, I want to do some job (i.e. check internet connection) on the first page. User may click 'next' button by mouse, or directly press enter/return by…
Royt
  • 199
  • 4
  • 14
1 2 3 4
5