Results 1 to 3 of 3

Thread: Problem with QWSServer::sendKeyEvent, how to use it?

  1. #1
    Join Date
    May 2008
    Location
    Spain
    Posts
    92
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default 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.

    Qt Code:
    1. void Touchpad::press_key_0()
    2. {
    3.  
    4. QWSServer::sendKeyEvent ( 30 , Qt::Key_0, 0, true, false );
    5. QWSServer::sendKeyEvent ( 30 , Qt::Key_0, 0, false, false );
    6. }
    To copy to clipboard, switch view to plain text mode 
    I am looking for infromation about it, but I can not find correct information.

    Best reagards

  2. #2
    Join Date
    May 2008
    Location
    Spain
    Posts
    92
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Problem with QWSServer::sendKeyEvent, how to use it?

    Well ,

    I have found a example code of sendKeyEvent:

    Qt Code:
    1. QWSServer::sendKeyEvent( -1, Qt::Key_0,0, true, false);
    2. QWSServer::sendKeyEvent( -1, Qt::Key_0,0, false, false);
    To copy to clipboard, switch view to plain text mode 

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

  3. #3
    Join Date
    Jun 2009
    Location
    India
    Posts
    143
    Thanks
    16
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question Re: Problem with QWSServer::sendKeyEvent, how to use it?

    Quote Originally Posted by webquinty View Post
    Well ,

    I have found a example code of sendKeyEvent:

    Qt Code:
    1. QWSServer::sendKeyEvent( -1, Qt::Key_0,0, true, false);
    2. QWSServer::sendKeyEvent( -1, Qt::Key_0,0, false, false);
    To copy to clipboard, switch view to plain text mode 

    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

Similar Threads

  1. deployment problem: msvc++ 2008 Express, Qt 4.4.3
    By vonCZ in forum Qt Programming
    Replies: 7
    Last Post: 10th November 2008, 14:38
  2. Problem in using QHttp with QTimer
    By Ferdous in forum Newbie
    Replies: 2
    Last Post: 6th September 2008, 12:48
  3. Weird problem: multithread QT app kills my linux
    By Ishark in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2008, 09:12
  4. Steps in solving a programming problem?
    By triperzonak in forum General Programming
    Replies: 8
    Last Post: 5th August 2008, 08:47
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.