Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to read keys and how to disable keys for embedded application?

How to read keys and how to disable keys for embedded application?

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 1 Posters 954 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? This user is from outside of this forum
    ? This user is from outside of this forum
    Guest
    wrote on last edited by
    #1

    hi all,

    i want to create an application in which i want to read the pressed keys on my device and for some part of application i want to disable some of the keys like e.g. shift key, space key etc. (from physical keyboard of device)
    i am able to read keys like enter, space, shift backspace from my device using key events (as given in qnamespace.h values) but not able to disable desired keys like space n shift.
    suppose there is simple screen with lineedit and a push button, so when the cursor is in lineedit all keys other than alpha n numbers should not work and when pushbutton is selected then only enter key should work.
    but in my application the pushbutton is pressed by space key instead of enter key also while entering in lineedit if i press shift bymistake the it stops taking input untill you again press it.
    want to solve this issues...can anybody help me with this
    thanks in advance....

    1 Reply Last reply
    0
    • X Offline
      X Offline
      Xander84
      wrote on last edited by
      #2

      Hey, if you want to disable certain keys for your input you could simply use an input mask or validator on the QLineEdit?
      check the doc for QLineEdit ::setInputMask and QLineEdit::setValidator

      key press events should be delivered to the widget that has the active focus, so I don't know why that ins't working like you want it to be?

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved