c++qtqt5qtplugin

How to use QVirtualKeyboard plugin without using QML?


I have X_Compiled Qt for BeagleBone Black and everything works fine. I've compiled Qt virtual keyboard plugin and I can load keyboard example on the device. I want to use this virtual keyboard in my C++ app. Can anyone show me the right way to do so?

I've also downloaded a plugin and compiled it but I don't know how to use it. Can any one tell me how to use Qt plugins like the two I mentioned above?


Solution

  • first of all make sure that the plugin is in the plugin folfer of Qt installation path and in main file add this line before creating QApplication object.

    qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));