Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. virtualKeyboard not sending events to qt application in Embedded Linux i.MX6 platform
QtWS25 Last Chance

virtualKeyboard not sending events to qt application in Embedded Linux i.MX6 platform

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
qt embeddedvirtualkeyboardengineqt5.5.1
2 Posts 1 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    T_Eng
    wrote on 15 Sept 2016, 20:25 last edited by
    #1

    I am trying to use githubuser0xFFFF's virtual keyboard with Qt5.5 on embedded linux system: https://github.com/githubuser0xFFFF/QtFreeVirtualKeyboard

    When the virtual keyboard runs QGuiApplication::focusObject() it crashes my qt program with "QCoreApplication::sendEvent: Unexpected null receiver"

    void DeclarativeInputEngine::sendKeyToFocusItem(const QString& text)
    {
        qDebug() << "CDeclarativeInputEngine::sendKeyToFocusItem " << text;
        QInputMethodEvent ev;
        if (text == QString("\x7F"))
        {
            //delete one char
            ev.setCommitString("",-1,1);
    
        } else
        {
            //add some text
            ev.setCommitString(text);
        }
        QCoreApplication::sendEvent(QGuiApplication::focusObject(),&ev);
    }
    

    How do I correctly connect my virtual keyboard declarative engine to my qt program in an embedded environment? Because the virtual keyboard works as expected on Ubuntu 14.04 development environment.

    Thanks!

    T 1 Reply Last reply 15 Sept 2016, 20:42
    0
    • T T_Eng
      15 Sept 2016, 20:25

      I am trying to use githubuser0xFFFF's virtual keyboard with Qt5.5 on embedded linux system: https://github.com/githubuser0xFFFF/QtFreeVirtualKeyboard

      When the virtual keyboard runs QGuiApplication::focusObject() it crashes my qt program with "QCoreApplication::sendEvent: Unexpected null receiver"

      void DeclarativeInputEngine::sendKeyToFocusItem(const QString& text)
      {
          qDebug() << "CDeclarativeInputEngine::sendKeyToFocusItem " << text;
          QInputMethodEvent ev;
          if (text == QString("\x7F"))
          {
              //delete one char
              ev.setCommitString("",-1,1);
      
          } else
          {
              //add some text
              ev.setCommitString(text);
          }
          QCoreApplication::sendEvent(QGuiApplication::focusObject(),&ev);
      }
      

      How do I correctly connect my virtual keyboard declarative engine to my qt program in an embedded environment? Because the virtual keyboard works as expected on Ubuntu 14.04 development environment.

      Thanks!

      T Offline
      T Offline
      T_Eng
      wrote on 15 Sept 2016, 20:42 last edited by
      #2

      @T_Eng Also to say that my GUI is Qt Quick Qml code and I am trying to fill a TextField qml type

      1 Reply Last reply
      0

      1/2

      15 Sept 2016, 20:25

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved