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

QtVirtualKeyboard over my widget

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 2.4k Views 2 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
    addebito
    wrote on last edited by
    #1

    Hello to everyone,

    I'm trying to understand how to move the QtVirtaulKeyboard or my widget because when the keyboard show up hide my widgets.
    Do you know a way to work around the problem?
    The application is a Qt Widget (C++).

    To enable the Qt virtual keyboard add the "virtualkeyboard" in .pro file.

    QT       += core gui virtualkeyboard
    

    and add the "qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));" line to the main.cpp.

    int main(int argc, char *argv[])
    {
        qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
    
        QApplication a(argc, argv);
        MainWindow w;
        w.show();
        return a.exec();
    }
    

    Run the application and... this is the problem.
    Thank you for any advice.

    ![alt text](60f10a01-4826-42d6-8664-5660bc9487b8-immagine.png image url)

    ![alt text](c0d3036c-1148-4d53-b88b-e1bdd896804e-immagine.png image url)

    Pl45m4P 1 Reply Last reply
    0
    • A addebito

      Hello to everyone,

      I'm trying to understand how to move the QtVirtaulKeyboard or my widget because when the keyboard show up hide my widgets.
      Do you know a way to work around the problem?
      The application is a Qt Widget (C++).

      To enable the Qt virtual keyboard add the "virtualkeyboard" in .pro file.

      QT       += core gui virtualkeyboard
      

      and add the "qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));" line to the main.cpp.

      int main(int argc, char *argv[])
      {
          qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
      
          QApplication a(argc, argv);
          MainWindow w;
          w.show();
          return a.exec();
      }
      

      Run the application and... this is the problem.
      Thank you for any advice.

      ![alt text](60f10a01-4826-42d6-8664-5660bc9487b8-immagine.png image url)

      ![alt text](c0d3036c-1148-4d53-b88b-e1bdd896804e-immagine.png image url)

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @addebito

      Hi,

      have you seen this (https://stackoverflow.com/questions/57161308/virtual-keyboard-or-onscreen-keyboard-for-qtwidgets-applications)?

      This solution moves your widget upwards until your input field is above the virtual keyboard bounding rect.


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      A 1 Reply Last reply
      3
      • Pl45m4P Pl45m4

        @addebito

        Hi,

        have you seen this (https://stackoverflow.com/questions/57161308/virtual-keyboard-or-onscreen-keyboard-for-qtwidgets-applications)?

        This solution moves your widget upwards until your input field is above the virtual keyboard bounding rect.

        A Offline
        A Offline
        addebito
        wrote on last edited by
        #3

        @Pl45m4 WOW!
        This is exactly what I was looking for.
        Thank you very much!

        1 Reply Last reply
        1
        • SGaistS SGaist referenced this topic on

        • Login

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