×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    138

    How to show and insert input from virtul keyboard in N9?

    Hi!

    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.

    Thanks.

  2. #2
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: How to show and insert input from virtul keyboard in N9?

    Hi,
    the MeeGo touch framework is actually deprecated and I suggest you to use this guide:
    http://www.developer.nokia.com/Commu...d_applications

    BTW I'm wondering how complicated is your UI... it looks you are putting more effort for fixing these things than write a couple of line in QML.
    Anyway ask here and we will help you to solve your problem as soon as possible

  3. #3
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    138

    Re: How to show and insert input from virtul keyboard in N9?

    There is same issues in QML, if when we use QML based line edit via QDeclarativeView.

    I just realized that QLineEdit does not lost text, if you disable error correction from text input settings. How can you do this modification via Qt application? Any API for that?

  4. #4
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: How to show and insert input from virtul keyboard in N9?

    Hi,
    You can set Qt::ImhNoPredictiveText to your Qt widget.
    Fore more info, please check: http://doc.qt.nokia.com/4.7-snapshot...ethodHint-enum

Similar Threads

  1. Input from (mini)USB keyboard for N95
    By WannyMan in forum Tools and SDK Feedback (Closed)
    Replies: 1
    Last Post: 2007-08-10, 18:06

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×