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

QInputDialog doesn't obey setInputMethodHints

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 4.7.2, 4.8.0
    • 4.6.3, 4.7.0
    • None
    • None
    • S60 3.1
    • 4ee912a752a4b7f129e98e180328f1f46f053d4f, 4b73e816189d924bd499fc8b7fb29365539d5e38

      Can't change phone's (Nokia E51) text input mode to "numeric".
      Input mode always remains "predictive" when QInputDialog is opened.

      Below is a sample code clip. (I have also tried id->setInputMethodHints(Qt::ImhPreferNumbers) )

      MainWindow::MainWindow(QWidget *parent) :
          QMainWindow(parent),
          ui(new Ui::MainWindow)
      {
          ui->setupUi(this);
      
          bool ok = false;
          QInputDialog *id = new QInputDialog();
          id->setInputMethodHints(Qt::ImhDigitsOnly);
          QString t = id->getText(
                  this, tr("PreferNumbers"),  tr("Input"),
                  QLineEdit::Normal, "1", &ok);
      }
      

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

            axisnokia axisnokia (Inactive)
            qtfor foo bar
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes