Solved Enabling arrow-key-navigation with QtVirtualKeyboard on Qt 5.15.1
-
Hi Everyone,
I am trying to enable arrow-key-navigation with QtVirtualKeyboard on Qt 5.15.1. However, it doesn't seem to do anything when I launch the Basic VirtualKeyboard Example. I press on my arrow keys and I don't see anything happening on the VirtualKeyboard. All I see is the cursor moving left and right in the Input box. Does anyone else have this issue?
Here are the steps that I performed:
- Run qmake on the qtvirtualkeyboard.pro with the arrow-key-navigation and disable-desktop option
qmake Qt/5.15.1/Src/qtvirtualkeyboard/qtvirtualkeyboard.pro CONFIG+=arrow-key-navigation CONFIG+=disable-desktop
- Run make and make install in the qtvirtualkeyboard directory
cd Qt/5.15.1/Src/qtvirtualkeyboard/ make make install
-
After it finished installing, I imported the qtvirtualkeyboard basic example from what was installed into QtCreator.
-
I configured the project in QtCreator to use the Kit that includes what was just rebuilt.
-
I edited the basic.pro file to include the arrow-key-navigation and disable-desktop
TARGET = basic QT += qml quick charts SOURCES += main.cpp CONFIG += link_pkgconfig CONFIG += disable-desktop CONFIG += arrow-key-navigation static { QT += svg QTPLUGIN += qtvirtualkeyboardplugin } ...
Finally, I ran the project. I clicked on a text field. Typed in a letter. And starting pressing left and right on my keyboard, but I don't see anything happening on the VirtualKeyboard. Instead, I just see the cursor moving left and right on the text field. What did I miss?
-
Fixed my issue. There were two parts to this issue.
First, I needed to be inside of the directory where the .pro file is kept when regenerating the Makefile.
cd Qt/5.15.1/Src/qtvirtualkeyboard/ Qt/5.15.1/gcc_64/bin/qmake qtvirtualkeyboard.pro CONFIG+=arrow-key-navigation
Second, I also had to rerun qmake on another .pro file as well to get it to update.
cd Qt/515.1/Src/qtvirtualkeyboard/src/virtualkeyboard/ Qt/5.15.1/gcc_64/bin/qmake virtualkeyboard.pro CONFIG+=arrow-key-navigation
I then ran make and make install.
cd Qt/515.1/Src/qtvirtualkeyboard/src/virtualkeyboard/ make cd Qt/5.15.1/Src/qtvirtualkeyboard/ make make install
After importing the updated virtualkeyboard module, I was able to use my arrow-keys to navigate the keyboard. Hopefully this is helpful for someone else!
-
Fixed my issue. There were two parts to this issue.
First, I needed to be inside of the directory where the .pro file is kept when regenerating the Makefile.
cd Qt/5.15.1/Src/qtvirtualkeyboard/ Qt/5.15.1/gcc_64/bin/qmake qtvirtualkeyboard.pro CONFIG+=arrow-key-navigation
Second, I also had to rerun qmake on another .pro file as well to get it to update.
cd Qt/515.1/Src/qtvirtualkeyboard/src/virtualkeyboard/ Qt/5.15.1/gcc_64/bin/qmake virtualkeyboard.pro CONFIG+=arrow-key-navigation
I then ran make and make install.
cd Qt/515.1/Src/qtvirtualkeyboard/src/virtualkeyboard/ make cd Qt/5.15.1/Src/qtvirtualkeyboard/ make make install
After importing the updated virtualkeyboard module, I was able to use my arrow-keys to navigate the keyboard. Hopefully this is helpful for someone else!