0

I need to generate a input of my keyboard because I have an event attached to this input. I try to call :

keyPressEvent(Qt::Key_Delete);

without sucess, is there a way to generate this keyPressEvent ?

rene
  • 41,474
  • 78
  • 114
  • 152
Evans Belloeil
  • 2,413
  • 7
  • 43
  • 76

1 Answers1

1

You might like to use a QkeyEvent.

Are you using Qt4 or Qt5?

Have a look at this:

https://stackoverflow.com/a/2035547/3751213

It might help.

Or, if you are using linux then xte would be great. It is included in xautomation.

xte 'key Delete'

Look here: http://linux.die.net/man/1/xte

Community
  • 1
  • 1
j809
  • 1,499
  • 1
  • 12
  • 22