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. Disable QtVirtualKeyBoard

Disable QtVirtualKeyBoard

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
6 Posts 3 Posters 4.2k 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.
  • R Offline
    R Offline
    Rui Braz
    wrote on last edited by
    #1

    Hello,
    I implemented the QtVirtualKeyboard in my QmlApplication but as far as I know there is no way to disable the VirtualKeyboard during the running of the application because when the user has a physical keyboard I want to disable the virtual.
    I tried this function but with no success:

    app.setAutoSipEnabled(false);
    

    This only worked on QtWidgetApplication.

    L 1 Reply Last reply
    2
    • R Rui Braz

      Hello,
      I implemented the QtVirtualKeyboard in my QmlApplication but as far as I know there is no way to disable the VirtualKeyboard during the running of the application because when the user has a physical keyboard I want to disable the virtual.
      I tried this function but with no success:

      app.setAutoSipEnabled(false);
      

      This only worked on QtWidgetApplication.

      L Offline
      L Offline
      Leandro
      wrote on last edited by
      #2

      @Rui-Braz Friend, just hide it.

      Are you using state to transition from invisible to visible, right? So, you can in the state verify some global property like

      [Window where you setup inputPane] {

      id: windowId

      property bool keyboardEnabled: true

      [...]

      [inputPane] {
      [...]
      id: inputPaneId

      [...]

      State {
      [...]
      when: inputPaneId.active && windowId.keyboardEnabled
      [...]

      Now, if you want to disable the keyboard, just set windowId.keyboardEnabled = false and it will not show.

      R L 2 Replies Last reply
      1
      • L Leandro

        @Rui-Braz Friend, just hide it.

        Are you using state to transition from invisible to visible, right? So, you can in the state verify some global property like

        [Window where you setup inputPane] {

        id: windowId

        property bool keyboardEnabled: true

        [...]

        [inputPane] {
        [...]
        id: inputPaneId

        [...]

        State {
        [...]
        when: inputPaneId.active && windowId.keyboardEnabled
        [...]

        Now, if you want to disable the keyboard, just set windowId.keyboardEnabled = false and it will not show.

        R Offline
        R Offline
        Rui Braz
        wrote on last edited by
        #3

        @Leandro Dear friend, thank you so much you solved part of my problem.
        This QtVirtualKeyboard is not compatible with WidgetApplication as you can see in the "Address Book Example", if you activate the virtual keyboard, after close a window the application crashes. This only happens on Linux.

        How can I solve this problem?

        L 1 Reply Last reply
        0
        • R Rui Braz

          @Leandro Dear friend, thank you so much you solved part of my problem.
          This QtVirtualKeyboard is not compatible with WidgetApplication as you can see in the "Address Book Example", if you activate the virtual keyboard, after close a window the application crashes. This only happens on Linux.

          How can I solve this problem?

          L Offline
          L Offline
          Leandro
          wrote on last edited by
          #4

          @Rui-Braz I cannot know as I didnt see your code, but sure it's trying to access invalid memory, which means in some place in the code it is destroying an already destroyed object.
          try debugging in step mode and you should see what is happening.

          R 1 Reply Last reply
          0
          • L Leandro

            @Rui-Braz I cannot know as I didnt see your code, but sure it's trying to access invalid memory, which means in some place in the code it is destroying an already destroyed object.
            try debugging in step mode and you should see what is happening.

            R Offline
            R Offline
            Rui Braz
            wrote on last edited by
            #5

            @Leandro I have done this. I just want to disable the virtual keyboard during the running of my application

            1 Reply Last reply
            0
            • L Leandro

              @Rui-Braz Friend, just hide it.

              Are you using state to transition from invisible to visible, right? So, you can in the state verify some global property like

              [Window where you setup inputPane] {

              id: windowId

              property bool keyboardEnabled: true

              [...]

              [inputPane] {
              [...]
              id: inputPaneId

              [...]

              State {
              [...]
              when: inputPaneId.active && windowId.keyboardEnabled
              [...]

              Now, if you want to disable the keyboard, just set windowId.keyboardEnabled = false and it will not show.

              L Offline
              L Offline
              lili2012
              wrote on last edited by
              #6

              @Leandro It works, great

              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