Disable QtVirtualKeyBoard



  • 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.



  • @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.



  • @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?



  • @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.



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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.