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. qregexpvalidator doesn't work in Android

qregexpvalidator doesn't work in Android

Scheduled Pinned Locked Moved Mobile and Embedded
androidandroidqtandroid 2.3.3qt5.4
7 Posts 2 Posters 1.9k 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.
  • BuleronB Offline
    BuleronB Offline
    Buleron
    wrote on last edited by Buleron
    #1

    QRegExpValidator* validator = new QRegExpValidator(QRegExp("[A-a-Z-z][A-a-Z-z]\\d{0,2}\\d[0-9-A-a-Z-z][A-a-Z-z]"));
    ui->lineEdit->setValidator(validator);

    it wokrs in windows but not in android

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Did you try with QRegularExpressionValidator ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • BuleronB Offline
        BuleronB Offline
        Buleron
        wrote on last edited by
        #3

        Hi @SGaist thanks for reply
        I just try with QRegularExpressionValidator but same problem it doesn't work

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What exactly doesn't work ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • BuleronB Offline
            BuleronB Offline
            Buleron
            wrote on last edited by Buleron
            #5

            this work correctly in windows , but when i deploy in android it doesnt
            ui->lineEdit->setMaxLength(7);
            QRegularExpressionValidator* valid = new QRegularExpressionValidator(QRegularExpression("[A-a-Z-z][A-a-Z-z]\\d{0,2}\\d[0-9-A-a-Z-z][A-a-Z-z]"));
            ui->lineEdit->setValidator(valid);

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Can you please describe precisely what doesn't work ? Is the input blocked ? Not validated ? etc.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • BuleronB Offline
                BuleronB Offline
                Buleron
                wrote on last edited by
                #7

                yes the input isn't blocked , it not validated!

                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