Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Validating QML TextInput's text by using virtual keyboard on MeeGo 1.1.80.6 OS
Forum Updated to NodeBB v4.3 + New Features

Validating QML TextInput's text by using virtual keyboard on MeeGo 1.1.80.6 OS

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.4k Views 1 Watching
  • 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.
  • M Offline
    M Offline
    Meraj Ahmad Ansari
    wrote on last edited by
    #1

    Hi All,

    I am using QML TextInput control. I want to validate the entered text (only alphanumeric is allowed)
    so i wrote code like this -
    @
    if ( ( event.key >= Qt.Key_A ) && ( event.key <= Qt.Key_Z ) )
    {
    event.accepted = false;
    }
    else if ( ( event.key >= Qt.Key_0 ) && ( event.key <= Qt.Key_9 ) )
    {
    event.accepted = false;
    }
    @
    Please note my underlying OS is MeeGo 1.1.80.6 and test machine is Lenove S10-3t netbook.
    This code is working fine when i am using netbook's keyboard but when i am using virtual keyboard then this code is not working.

    Anybody have an idea?

    Regards,
    Meraj

    [edit: code highlighted / Denis Kormalev]

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DenisKormalev
      wrote on last edited by
      #2

      Please don't forget to use @ tags.

      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