Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Custom Virtual Keyboard issue
Forum Update on Monday, May 27th 2025

Custom Virtual Keyboard issue

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 464 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.
  • D Offline
    D Offline
    deleted470
    wrote on 25 Mar 2019, 08:36 last edited by
    #1

    Hi,

    Long story short: How can different custom keyboard layouts be used in the same application but on different QML forms?

    I'm using Qt 5.9.4 on Ubuntu 16.04.
    I have Qt Quick application that I want to have different keyboard layout on the different QML forms.
    Currently the virtual keyboard is working fine but it is the same layout on every screen.

    I have copied the en_GB layout from Qt folder and modified it for my needs.
    Using this line of code I have successfully added the new custom layout:

    qputenv("QT_VIRTUALKEYBOARD_LAYOUT_PATH", "/path/to/layouts");
    

    But this way the custom keyboard is shown on every QML form.

    Thank you.

    J 1 Reply Last reply 25 Mar 2019, 10:52
    0
    • D deleted470
      25 Mar 2019, 08:36

      Hi,

      Long story short: How can different custom keyboard layouts be used in the same application but on different QML forms?

      I'm using Qt 5.9.4 on Ubuntu 16.04.
      I have Qt Quick application that I want to have different keyboard layout on the different QML forms.
      Currently the virtual keyboard is working fine but it is the same layout on every screen.

      I have copied the en_GB layout from Qt folder and modified it for my needs.
      Using this line of code I have successfully added the new custom layout:

      qputenv("QT_VIRTUALKEYBOARD_LAYOUT_PATH", "/path/to/layouts");
      

      But this way the custom keyboard is shown on every QML form.

      Thank you.

      J Offline
      J Offline
      JonB
      wrote on 25 Mar 2019, 10:52 last edited by
      #2

      @milen.vichev
      I know nothing about this. But while you're waiting for anyone else to answer: assuming that Qt responds to whatever QT_VIRTUALKEYBOARD_LAYOUT_PATH happens to be at the instant a form is shown (and doesn't cache a previously used value) you could try re-issuing the desired qputenv("QT_VIRTUALKEYBOARD_LAYOUT_PATH", "/path/to/layouts"); with a different layout just before each form gets opened (via whatever signal tells you a form is about to be loaded/displayed)?

      1 Reply Last reply
      1
      • D Offline
        D Offline
        deleted470
        wrote on 25 Mar 2019, 15:53 last edited by
        #3

        @JonB ,
        Thank you.
        Tried it but unfortunately it does not work. Probably because all of my QML forms are loaded in StackLayout and after that the environment variables are not read any more.

        1 Reply Last reply
        0

        1/3

        25 Mar 2019, 08:36

        • Login

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