Problem with QWSServer::sendKeyEvent, how to use it?
Hello,
I am trying to develop a touchpad and I would like to use sendKeyEvent from class QWSServer. I have created a public slot when a press a button. The form only have a button and QLineEdit. But when I press button nothing appear in QLineEdit.
Code:
void Touchpad::press_key_0()
{
QWSServer::sendKeyEvent ( 30 , Qt
::Key_0,
0,
true,
false );
QWSServer::sendKeyEvent ( 30 , Qt
::Key_0,
0,
false,
false );
}
I am looking for infromation about it, but I can not find correct information.
Best reagards
Re: Problem with QWSServer::sendKeyEvent, how to use it?
Well ,
I have found a example code of sendKeyEvent:
Code:
QWSServer::sendKeyEvent( -1, Qt
::Key_0,
0,
true,
false);
QWSServer::sendKeyEvent( -1, Qt
::Key_0,
0,
false,
false);
And now, all number works fine, but what is mean unicode = -1???
But I still have a bit problem, with the same code, I have tried with dot and minus, but it does not work.
Any advice???
Re: Problem with QWSServer::sendKeyEvent, how to use it?
Quote:
Originally Posted by
webquinty
Well ,
I have found a example code of sendKeyEvent:
Code:
QWSServer::sendKeyEvent( -1, Qt
::Key_0,
0,
true,
false);
QWSServer::sendKeyEvent( -1, Qt
::Key_0,
0,
false,
false);
And now, all number works fine, but what is mean unicode = -1???
But I still have a bit problem, with the same code, I have tried with dot and minus, but it does not work.
Any advice???
Hi ,
Please can you send the code of vitual Keyboard .
I have developed a form and added Push Button to it . As A,B,C Characters and whenver the key is pressed i use the above SendKeyevent. As i studied i need to set the widget flags to WStyle_Tool and WStyle_Customize to be set. ? So that the key events are send to other window...Now how do i do that.. Please help me