Unsolved Regarding the Loading the qtvirtualkeyboardplugin to the sample app created
-
Hi,
i created sample app, to load the qtvirtualkeyboardplugin, i added the few lines of code in main.cpp and .pro file of sampleprogram
and sampleprogram.pro file looks like,
QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = sampleprogram_VirtualKeyboard TEMPLATE = app CONFIG += link_pkgconfig static { QTPLUGIN += qtvirtualkeyboardplugin } INSTALLS += target SOURCES += main.cpp\ MyWidget.cpp HEADERS += MyWidget.h
main.cpp looks like
qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard")); QApplication a(argc, argv); MyWidget w; w.show(); return a.exec();
sampleprogram.cpp looks like,
m_edit = new QLineEdit; m_vbox = new QVBoxLayout; m_vbox->addWidget(m_edit); this->setLayout(m_vbox);
- link to Screenshot of chinese language is,
https://s18.postimg.org/ajk0so1m1/Screenshot_37.png
- link to screnshot of arabic language is,
https://s23.postimg.org/zc2zkkaor/Screenshot_38.png
i changed the language in .pro file of qtvirtualkeyboard ,then ran the sample project .
I am able to achieve and get virtualkeyboardplugin, when clicked on lineedit of sample app,- My query is how can the qtvirtualkeyboard.dll be placed in the project folder and then run the sample project,
or how can the dll's be placed in the location where user wants, and load the virtual keyboard to the sample project.
Please provide the guidance,
Thanks,
-
HI,
any updates please, can i load the libvirtualkeyboard.so to the sample app, from any path?.
Thanks,
-
Hi,
Do you mean deploy the plugin like described in the QtVirtualKeyboard deployment documentation ?
-
Yes i followed the docs of how to include in main file, and with the help of forum , how to compile,
but wat i require is ,1 step :
i have a 1 screen with combobox box and pushbutton, clicking on submit navigates to next screen.then
2 Step :
the below image is 2 screen with lineedit and pushbutton, when i click on lineedit, virtualkeyboard appears. with the language english by default.Now when i select the french or spanish language , the respective language keyboard should appear without clicking on button in virtualkeyboard.
And
My 2 query is can the libqtvirtualkeyboardplugin.so of virtualkeyboard be moved to different folder and load from the respective path?.
instead of /home/user/Qt5.7.0/5.7/gcc_64/plugins/platforminputcontexts?.Thanks,
-
I this doable or how can i approach in order to achieve the task?.
please suggest.!!!!!.
Thanks,
-
@Pradeep-Kumar
<ironic>
maybe it helps to add a lot more exclamation marks...
</ironic>--edit
ironic tags added -
@the_ didnt get u?., still require some explanation for the query.
Thanks,
-
-
Sorry about that exclamation in bold, and will look into the link which u @SGaist provided, and if i have a query i will get back to u guys.
Thanks,
-
Hello,
Can the user get the plugin loaded from any path means, can the user add libqtvirtualkeyboardplugin.so to the project directory and then load,
How can we achieve this.
Thanks,
-
IIRC, you would need to also call QCoreApplication::addLibraryPath but in any case, no you can't put plugins in random places for your application to load.
-
Hi,
Thanks for the reply @SGaist ,
- Asked because i want this libqtvirtualkeyboardplugin.so which is there in the path
/home/user/Qt5.7.0/5.7/gcc_64/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so
to be placed in desktop or any other folder may be in user path, and then use QPluginLoader to load the lib so in my app, will be having LineEdit ,on click on it virtualkeyboard appears.
This is what am thinking to do.
- My another query is in the same path libcomposeplatforminputcontextplugin.so and
libibusplatforminputcontextplugin.so is present in the same path of libqtvirtualkeyboardplugin.so , is it related to qtvirtualkeyboard?.
Thanks,
-
Qt uses a known folder structure for its plugins so for example, input related plugins should be put in platforminputcontexts.
What is the rational behind putting that plugin in your user desktop folder ?