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. [solved] How to force lower case keyboard in TextField?
Forum Updated to NodeBB v4.3 + New Features

[solved] How to force lower case keyboard in TextField?

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 3 Posters 4.5k 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.
  • Q Offline
    Q Offline
    qgil
    wrote on last edited by
    #1

    Hi, I'm using a "TextField":http://harmattan-dev.nokia.com/docs/library/html/qt-components/qt-components-meego-textfield.html?tab=1 from com.nokia.meego in MeeGo Harmattan. When the user taps it the virtual keyboard shows up in upper case. However, this is for a login field where we want the default to be in lower case. I can't find in the docs how to force it. Any hints?

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

      As a wild guess (didn't try it for lower/upper case) will recommend to look at inputMethodHints. At least it works in case of digits.

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        qgil
        wrote on last edited by
        #3

        Indeed! The solution is:

        @ TextField {
        ...
        inputMethodHints: Qt.ImhNoAutoUppercase@

        Thank you very much!

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          qgil
          wrote on last edited by
          #4

          er... silly question: what is the right syntax to add more than one hint? I just saw that it would ve convenient to ass Qt.ImhNoPredictiveText as well but I'm not finding the right way to set it together with Qt.ImhNoAutoUppercase.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mbrasser
            wrote on last edited by
            #5

            Hi,

            You should be able to specify multiple values as follows:

            @
            TextField {
            ...
            inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText
            @

            Regards,
            Michael

            1 Reply Last reply
            0
            • Q Offline
              Q Offline
              qgil
              wrote on last edited by
              #6

              Thanks! So simple... I had tried

              @inputMethodHints: Qt.ImhNoAutoUppercase & Qt.ImhNoPredictiveText@

              which makes sense from a natural language point of view but, now I see, not from a computer language point of view. ;)

              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