Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Switch input context while running app

Switch input context while running app

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 394 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.
  • A Offline
    A Offline
    Annili
    wrote on last edited by
    #1

    I wrote custom plugin derived from QPlatformInputContext to use it as virtual input panel. So to load plugin i use :

    qputenv("QT_IM_MODULE", QByteArray("customvirtualkeyboard"));
    QApplication a(argc, argv);
    ....

    It's all works fine. But qputenv works only before QApplication was created. But i want to have oportunity to on and off virtual panel while running application.
    Is there a way to somehow update enviroment to qputenv/qunsetenv works? Or maybe switch inputcontext to default?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      AFAIK, you can't do it dynamically like that. Most of the QPA plugins creates it once the first time the input context is requested or even at the backend creation time.

      So basically it means that you would need to add support for that in the backend of the platform your application will run on.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

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