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 ?
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 ?
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