Results 1 to 1 of 1

Thread: Windows Mobile Hardware Keyboard problem

  1. #1
    Join Date
    Nov 2010
    Posts
    6
    Thanks
    2
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows Symbian S60

    Default Re: Windows Mobile Hardware Keyboard problem

    I have a weird problem with my Motorola MC75a in a graphicsview based application.
    Hardware "s" button acts like a "backspace" button. Im using Windows Mobile 6.5 and qt 4.7. I've asked the Qt Support for this problem but they told that "Unfortunately we don't have such a device here at the moment, but I cannot reproduce a problem with a non full qwerty device because we only translate the numbers in that case. If you use the on screen keyboard then can you reproduce the problem then or is it only with the hard keyboard?".

    I've tested this problem on full qwerty and non-full qwerty device.
    Can anyone has a simple solution for my problem


    Added after 1 33 minutes:


    Ok, i have a solutions.
    you must install a eventfilter to qapplication object in main.cpp. Filter Class should look like this :

    Qt Code:
    1. class KeyboardFilter : public QObject
    2. {
    3. public:
    4. KeyboardFilter(){};
    5. bool eventFilter(QObject *object, QEvent *e)
    6. {
    7. if (e->type() == QEvent::KeyPress)
    8. {
    9. QKeyEvent* keyPress = (QKeyEvent*)e;
    10. if (keyPress->nativeScanCode() == 105)
    11. {
    12. QKeyEvent* sKeyPress = new QKeyEvent(QEvent::KeyPress,
    13. 83,
    14. keyPress->modifiers(),
    15. keyPress->text(),
    16. keyPress->isAutoRepeat(),
    17. keyPress->count());
    18.  
    19. QApplication::sendEvent(object, sKeyPress);
    20. return true;
    21. }
    22.  
    23. }
    24.  
    25. return QObject::eventFilter(object, e);
    26. }
    27. };
    To copy to clipboard, switch view to plain text mode 

    that should do the trick.

    Pozdro.
    Last edited by grublik; 3rd December 2010 at 11:57.

Similar Threads

  1. Windows Mobile VGA Screen font size problem
    By LordG in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 25th November 2010, 09:13
  2. Use C# and Qt on Windows Mobile
    By Andi88 in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 17th July 2010, 21:24
  3. QCheckBox styling problem on Windows Mobile
    By hubbobubbo in forum Qt Programming
    Replies: 1
    Last Post: 27th April 2010, 16:56
  4. Can not run QT App on Windows Mobile
    By zyclop in forum Newbie
    Replies: 1
    Last Post: 22nd April 2010, 09:26
  5. Windows change hardware acceleration setting
    By jakamph in forum Qt Programming
    Replies: 1
    Last Post: 15th November 2006, 07:10

Tags for this Thread

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.