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

Input method hints are not correct if using proxy widget

    XMLWordPrintable

Details

    • 507a819971cd0cb3d6acba96177ab3553dae9867

    Description

      If the following code is run, the lineEdit shows input like hinted by hints:

      #include <QtGui/QApplication>
      #include <QLineEdit>
      #include <QGraphicsView>
      #include <QGraphicsProxyWidget>
      #include <QGraphicsWidget>
      
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
      
          QGraphicsView graphicsView;
          QGraphicsScene scene;
          graphicsView.setScene(&scene);
      
          QGraphicsWidget gw;
      
          QWidget w;
          QLineEdit* lineEdit = new QLineEdit(/* &w */); // Change this. Parent will break vkb password
          lineEdit->setEchoMode(QLineEdit::Password);
          lineEdit->setInputMethodHints(Qt::ImhHiddenText| Qt::ImhNoPredictiveText | Qt::ImhNoAutoUppercase);
      
          QGraphicsProxyWidget* pw = new QGraphicsProxyWidget();
          pw->setWidget(lineEdit /* &w */);   // Change this.
          pw->setFlag(QGraphicsItem::ItemAcceptsInputMethod);
          pw->setParentItem(&gw);
          scene.addItem(pw);
      
          graphicsView.showMaximized();
      
          return app.exec();
      }
      

      But if modifications are done (see "Change this" tags), then lineedit will not get modified by the hints.
      Originally discussed here: http://discussion.forum.nokia.com/forum/showthread.php?222285-Virtual-keyboard-and-password-echo&p=832569#poststop

      Attachments

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

        Activity

          People

            samimeri Sami Merila (Inactive)
            samimeri Sami Merila (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes