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
Forum Updated to NodeBB v4.3 + New Features

Switch input context while running app

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 429 Views 1 Watching
  • 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 4 May 2017, 10:12 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
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 4 May 2017, 21:36 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

      1/2

      4 May 2017, 10:12

      • 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