Results 1 to 4 of 4

Thread: How can I set the keyboard input mode?

  1. #1
    Join Date
    Nov 2011
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default How can I set the keyboard input mode?

    Hi All,

    I have a QLineEdit widget and I want to set the keyboard input mode to only numbers, using a Windows Std device. Is there a way to do this with some Qt method, or do I have to use the following Windows function:
    Qt Code:
    1. SHSetImeMode(effectiveWinId(), SHIME_MODE_NUMBERS);
    To copy to clipboard, switch view to plain text mode 

    Thanks!

  2. #2
    Join Date
    Feb 2011
    Location
    Romania
    Posts
    53
    Thanks
    1
    Thanked 11 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How can I set the keyboard input mode?


  3. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How can I set the keyboard input mode?

    For a simple check you can also use QLineEdit::inputMask

  4. #4
    Join Date
    Nov 2011
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How can I set the keyboard input mode?

    Thanks for your responses Guys!

    The thing is that I'm working with a Windows Std mobile device, so instead of verifying the string that the user has entered, I'd need to set the keyboard input mode for certain QLineEdit widgets. I mean, switch it from alphabetical or dictionary mode to numbers only mode when they got focused. That's why I was thinking about the SHSetImeMode Windows method. Is this correct or there is another way to set the keyboard input mode?

    Thanks a lot again!

Similar Threads

  1. Disable keyboard input for spinbox entry
    By babygal in forum Qt Programming
    Replies: 8
    Last Post: 2nd December 2016, 01:06
  2. Virtual Keyboard display mode
    By juanchoc in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 1st May 2011, 18:06
  3. Keyboard shortcuts in full screen mode
    By dfijma in forum Qt Programming
    Replies: 1
    Last Post: 29th November 2010, 13:09
  4. read input string --> text mode
    By eleanor in forum Qt Programming
    Replies: 1
    Last Post: 25th October 2007, 18:08
  5. How to enable keyboard and mouse as input in qtopia-2.1.1
    By hvreddy1110 in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 12th October 2006, 10:30

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.