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. how can add qtVirtualKeyboard to QLineEdit
QtWS25 Last Chance

how can add qtVirtualKeyboard to QLineEdit

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
8 Posts 2 Posters 2.3k 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.
  • I Offline
    I Offline
    isan
    wrote on last edited by isan
    #1

    I'm new in QML and I want to use qtVirtualKeyboard with QlineEdit ,if clicked on QlineEdit, the keyboard will show ,how can I do this?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Check the docs https://doc.qt.io/qt-5/qtvirtualkeyboard-index.html and make sure your platform is supported.

      (Z(:^

      I 1 Reply Last reply
      0
      • sierdzioS sierdzio

        Check the docs https://doc.qt.io/qt-5/qtvirtualkeyboard-index.html and make sure your platform is supported.

        I Offline
        I Offline
        isan
        wrote on last edited by isan
        #3

        @sierdzio I can run Qt Quick Virtual Keyboard - Basic Example ,but I want to know how can add QML to qlineEdit,Is it possible?

        sierdzioS 1 Reply Last reply
        0
        • I isan

          @sierdzio I can run Qt Quick Virtual Keyboard - Basic Example ,but I want to know how can add QML to qlineEdit,Is it possible?

          sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          @isan said in how can add qtVirtualKeyboard to QLineEdit:

          but I want to know how can add QML to qlineEdit,Is it possible?

          What has QML to do with QLineEdit?

          If you follow the docs, QtVirtualKeyboard will show up for all text inputs in your application, including QLineEdit.

          (Z(:^

          I 1 Reply Last reply
          0
          • sierdzioS sierdzio

            @isan said in how can add qtVirtualKeyboard to QLineEdit:

            but I want to know how can add QML to qlineEdit,Is it possible?

            What has QML to do with QLineEdit?

            If you follow the docs, QtVirtualKeyboard will show up for all text inputs in your application, including QLineEdit.

            I Offline
            I Offline
            isan
            wrote on last edited by
            #5

            @sierdzio I follow this link the doc is difficult to understand , I follow the
            Using Qt Virtual Keyboard with Qt Wayland for see the output of example
            and
            when I run

            QT_XCB_GL_INTEGRATION=xcb_egl QT_WAYLAND_CLIENT_BUFFER_INTEGRATION=xcomposite-egl QT_IM_MODULE=qtvirtualkeyboard ./pure-qml -platform xcb
            
            

            output is:

            qt.qpa.screen: QXcbConnection: Could not connect to display
            Could not connect to any X display.
            

            On the guide says

            qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
            
            
            In the desktop integration method, this step is all that is required to use Qt Virtual Keyboard. In the application integration method, the application is required to create an instance of InputPanel as explained in the following chapter.
            

            So I need just add this line to my QT widget project and create input panel for use the keyboard?

            sierdzioS 1 Reply Last reply
            0
            • I isan

              @sierdzio I follow this link the doc is difficult to understand , I follow the
              Using Qt Virtual Keyboard with Qt Wayland for see the output of example
              and
              when I run

              QT_XCB_GL_INTEGRATION=xcb_egl QT_WAYLAND_CLIENT_BUFFER_INTEGRATION=xcomposite-egl QT_IM_MODULE=qtvirtualkeyboard ./pure-qml -platform xcb
              
              

              output is:

              qt.qpa.screen: QXcbConnection: Could not connect to display
              Could not connect to any X display.
              

              On the guide says

              qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
              
              
              In the desktop integration method, this step is all that is required to use Qt Virtual Keyboard. In the application integration method, the application is required to create an instance of InputPanel as explained in the following chapter.
              

              So I need just add this line to my QT widget project and create input panel for use the keyboard?

              sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              @isan said in how can add qtVirtualKeyboard to QLineEdit:

              So I need just add this line to my QT widget project and create input panel for use the keyboard?

              As far as I understand, just the qputenv should be enough.

              (Z(:^

              I 1 Reply Last reply
              0
              • sierdzioS sierdzio

                @isan said in how can add qtVirtualKeyboard to QLineEdit:

                So I need just add this line to my QT widget project and create input panel for use the keyboard?

                As far as I understand, just the qputenv should be enough.

                I Offline
                I Offline
                isan
                wrote on last edited by isan
                #7

                @sierdzio I just add this line to main.cpp but keyboard not opening, should be add qml source file of keyboard to qt widget project?

                sierdzioS 1 Reply Last reply
                0
                • I isan

                  @sierdzio I just add this line to main.cpp but keyboard not opening, should be add qml source file of keyboard to qt widget project?

                  sierdzioS Offline
                  sierdzioS Offline
                  sierdzio
                  Moderators
                  wrote on last edited by
                  #8

                  @isan said in how can add qtVirtualKeyboard to QLineEdit:

                  @sierdzio I just add this line to main.cpp but keyboard not opening, should be add qml source file of keyboard to qt widget project?

                  I don't know, sorry.

                  (Z(:^

                  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