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. QIntValidator and Swedish QLocale problem
QtWS25 Last Chance

QIntValidator and Swedish QLocale problem

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 874 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.
  • B Offline
    B Offline
    Bargonaut
    wrote on last edited by
    #1

    Hello,
    I have reported this issue as a bug (https://bugreports.qt-project.org/browse/QTBUG-35069), but I wonder if anyone has a thought about the following problem. If I set a QIntValidator which allows negative numbers on a QLineEdit, the field blocks the minus character in the Swedish QLocale.

    Here is a quick sample:
    QLineEdit* entry = new QLineEdit();
    QLocale loc("sv_SE");
    QIntValidator* pValidator = new QIntValidator(-9, 9, entry);
    pValidator->setLocale(loc);
    entry->setValidator(pValidator);

    When the locale is set to "en_US" (US English) or even "fi_FI" (Finnish), the user can enter negative values in the field. However, the Swedish locale block the user from typing a minus sign. Does anyone know of a reason why this would be intentional, or is this issue truly a bug?

    thanks,
    Brad

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

      Hi,

      The fix is on its way

      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
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        The bug has been fixed

        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

        • Login

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