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. Can not display qt virtual keyboard.
Forum Updated to NodeBB v4.3 + New Features

Can not display qt virtual keyboard.

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 1.7k 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.
  • Q Offline
    Q Offline
    Qingshui Kong
    wrote on last edited by
    #1

    Could somebody give me a help? Thanks!

    Recently, I am designing a QT Widgets Application for fun. But there is a problem I can't fix.

    I want to use qtvirtualkeuboard. It works at the begining.

    But when I change the application to full screen, it doesn't work. I think the qtvirtualkeyboard is opened but not displayed topmost.

    The code is shown as bellow.

    When I use w.show(), it works. It can open virtualkeyboard when click a QLineEdit.

    int main(int argc, char *argv[])
    {
    qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));

    QApplication a(argc, argv);
    
    MainWindow w;
    w.show();
    
    return a.exec();
    

    }

    When I use w.showFullScreen(), it doesn't work. It can't open virtualkeyboard when click a QLineEdit.

    int main(int argc, char *argv[])
    {
    qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));

    QApplication a(argc, argv);
    
    MainWindow w;
    w.showFullScreen();
    
    return a.exec();
    

    }

    I don't the reason. Could somebody tell me the reason and teach me how to change the code of my application or the source code of qtvirtualkeyboard, please?

    Thanks!

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

      Hi,

      What version of Qt are you using ?
      On what platform ?
      With which compiler ?

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

      Q 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        What version of Qt are you using ?
        On what platform ?
        With which compiler ?

        Q Offline
        Q Offline
        Qingshui Kong
        wrote on last edited by
        #3

        @SGaist
        Hi SGaist,

        I use Qt5.9.1.
        And it doesn't work on either Windows 7 or Ubuntu 16.04.
        For Windows 7, I use MSVC2013 64bit. And for Ubuntu 16.04, I use GCC 64bit.

        By the way, I find out something. On Windows 7. If I use opengl in my application code, such as QOpenGLWidget and QOpenGLFunctions_2_0, it will not work. But if I don't use opengl, it will work.
        But on Ubuntu 16.04, no matter I use opengl whether or not, it doen't work.

        Windows 7
        0_1537233531185_954aaa48-0d49-45c8-9840-49bdc1b54e7d-image.png
        0_1537233623671_6063dacc-063e-4df2-a3c2-df6b215fed82-image.png

        Ubuntu 16.04
        0_1537233786276_c740aa90-6089-49a3-b3b2-bb94fc0ab794-image.png
        0_1537233895577_b2aefcce-f20c-49d6-bafa-010d24b0280e-image.png

        Thanks!

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

          What happens if you maximize the window after the keyboard is shown ?

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

          Q 1 Reply Last reply
          0
          • SGaistS SGaist

            What happens if you maximize the window after the keyboard is shown ?

            Q Offline
            Q Offline
            Qingshui Kong
            wrote on last edited by
            #5

            @SGaist
            I don't understand you clearly.

            If I use w.show(), it works normally, no matter maximize or normal the window.

            If I use w.showFullScreen(), it doesn't work. And I can't change the size of the window.

            Maybe, you mean I use w.show() first, after the virtualkeyboard appears, I change the window to maximize by setting windows flags. Am I right? I didn't try this.

            Thank you!

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

              Yes, that's that. Start using show, and after that go full screen.

              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