Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.3
-
Sym3
-
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