Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-88716

Eastern Arabic numerals are not recognized as such in Qt Widgets

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.1
    • None
    • Arch Linux

    Description

       Qt Widgets should allow inputting different numeral systems irrespective of the application locale. For example, in this simple application:

      #include <QApplication> 
      #include <QLocale> 
      #include <QWidget> 
      #include <QSpinBox> 
       
      int main(int argc, char* argv[]) 
      { 
          QApplication app (argc, argv); 
      
          QLocale::setDefault(QLocale(QLocale::Arabic, QLocale::Sudan));
          QSpinBox *arBox = new QSpinBox; 
       
          QLocale::setDefault(QLocale(QLocale::English)); 
          QSpinBox *enBox = new QSpinBox; 
       
          arBox->show(); 
          enBox->show(); 
          return app.exec(); 
      }

      arBox works correctly and allow me to input Eastern Arabic numerals as well as Arabic Numerals. However, enBox only allow input in Arabic Numerals.

      Many users would prefer to keep their locale and interface language in English e.g. but be able to input text in their language, Arabic in my case. Unicode assign Numeric_Type and Numeric_Value properties to character that represent numbers and they should be treated as such.

      Though my example tested QSpinBox, the problem exist in other widgets like QDateEdit and QTimeEdit.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            munzirtaha Munzir Taha (منذر طه)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes