Ok. Found the issue. Problem arises when password field is child of a top-level widget that is wrapped by QGraphicsProxyWidget. If I wrap just password field with QGraphicsWidgetProxy it works.
This code works fine. But if you change parent of QLineEdit and set that parent to QGraphicsProxyWidget, it will break. Both password echo and ImhNoAutoUppercase are missing.
Code:
#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();
}
This isn't easy to fix, but much easier than tinkering with Symbian specific voodoo. In my specific case, there is a login widget in scene. I have to make password field as separate item. It will break some animations, but this hiding of password seems to be important issue to many users.