I am porting my QWidget-based C++ application from Symbian to Harmattan. My application is running otherwise almost perfectly, but I have been struggling with integration to Harmattan's Text Input framework. It seems that QLineEdit and other QWidgets are poorly supported. In order to open the virtual keyboard, user must tap twice on QLineEdit - and once VKB opens, even if text appears correctly in QLineEdit, the content in it is only passed onwards from VKB to QLineEdit if user closes the VKB by manually pulling it down via swipe down gesture. If closing it programmatically, text content is lost. Ideally, VKB would automatically close itself when focus of QLineEdit is lost. I have also tried to hack it so that always when focus is lost, I call void MInputMethodState::closeSoftwareInputPanel( ) see http://apidocs.meego.com/1.1/platfor...hod_state.html
Above solution works almost perfectly: VKB is indeed closed and opened as I wish, but the content of QLineEdit that user just typed into, is lost after this call. So things like sign in UI are pretty awkward: user sees content in line edit, but qDebug() reveals only an empty string is actually passed on when calling QLineEdit::text(). Also I have found no way to get inputs from MInputMethodState so that I could pass them myself to an array and work this around. I have also tried replacing QLineEdit with QDeclarativeView and inserting there a QML TextInput element - this element appears fine on the UI, but it is also not able open software input panel when focus is gained. Is this because I am within a QApplication, and not MApplication or QML ApplicationWindow?
If anybody know how to best solve this input puzzle so that I can still stay in QWidget based app, it would save me several weeks of porting effort.