Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Input Mask text field: "End" key not working correctly
Forum Updated to NodeBB v4.3 + New Features

Input Mask text field: "End" key not working correctly

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 1 Posters 767 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.
  • _ Offline
    _ Offline
    __Alex__
    wrote on last edited by
    #1

    Hello everyone,

    I have the following problem: If I mask a TextInput field e.g. with a date mask "00.00.0000", then hitting the "End" key navigates the cursor to position 2 (with 0 being the beginning of the field). When I hit it again, it navigates to position 1 and hitting "End" yet again naviagtes back to position 2.

    I would expect the cursor to navigate to the very end of the text field instead, but apparently QML assumes that the string has only 2 characters (the two periods) and therefore navigates behind them. I can only navigate to the very end if I write a digit into all spaces.

    Also, if I enter a date, then go back and delete a digit from somewhere in the middle, then hitting the "End" key navigates to the second last position and the cursor can only navigate to that position as well. Note that when the field was empty the cursor could navigate to the very end.

    What can I do to make masked input fields behave as a user would expect them to?

    I am using Qt 4.7.4 with Qt Creator 2.4.1 on Ubuntu 32 Bit.

    Cheers
    Alex

    1 Reply Last reply
    0
    • _ Offline
      _ Offline
      __Alex__
      wrote on last edited by
      #2

      Did nobody have this problem before me?

      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