Results 1 to 10 of 10

Thread: How to disable keyboard

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How to disable keyboard

    Did you actually read what the function documentation says? After reading it, it doesn't make sense what you're saying.
    J-P Nurmi

  2. #2
    Join Date
    Aug 2008
    Posts
    12
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: How to disable keyboard

    Ow Really...?
    Well, I am very newbie in QT. Maybe there are some misunderstandings in reading the help.

    Btw, I have try by doing this:

    Qt Code:
    1. void keyPressEvent(QKeyEvent *e){
    2. if(e->key()==16777251){
    3. grabKeyboard();
    4. }
    5. }
    To copy to clipboard, switch view to plain text mode 
    But the effect of this code, the program become hang. Cannot be resize or anything except the close button on the top right, to close the program.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to disable keyboard

    Did you read until that part?

    This widget receives all keyboard events until releaseKeyboard() is called; other widgets get no keyboard events at all.
    You don't call it when you receive a key event - you call it to prevent other widgets from receiving key events. And it also says you have to eventually release the keyboard...

  4. #4
    Join Date
    Aug 2008
    Posts
    12
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: How to disable keyboard

    Oow... Hm.. OK.. I understand what do you mean now..

Similar Threads

  1. On Screen Keyboard Problem
    By cutie.monkey in forum Qt Programming
    Replies: 1
    Last Post: 16th July 2008, 13:28
  2. How to disable NextButton in QWizard ?
    By litroncn in forum Qt Programming
    Replies: 3
    Last Post: 27th May 2008, 07:05
  3. Virtual Keyboard on Qtopia 4.2.1
    By shapirlex in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 11th April 2007, 15:51
  4. Replies: 2
    Last Post: 24th July 2006, 18:36

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
  •  
Qt is a trademark of The Qt Company.