Regarding how to use rename the plugin and load based on user input selected langauge of qtvirtualkeyboard



  • Hi,

    I have qtvirtualkeyboard compiled, and got the libqtvirtualkeyboardplugin.so which is their in the path :

    /home/user/Qt5.8.0/5.8/gcc_64/plugins/platforminputcontexts

    1. Is it the right path where if we compile qtvirtualkeyboard, the place where plugin resides?.

    2. And can i rename the plugin , if so how?.

    Thanks,


  • Moderators

    @Pradeep-Kumar Why do you want to rename it?



  • because i have two screens ,

    1. in one screen, i have combox and pushbutton.
      when i select the language from combobox and click submit button, second screen appears where i have lineedit and button to go back.

    2. in the lineedit if i click i need to get virtualkeyboard, of respective language.

    So i am asking this question, where now how it is happening is , i am getting virtual keyboard, but i need to select the language clciking on the button.

    This is my requirement, please help me out?.

    Thanks,



  • @Pradeep-Kumar ,

    You need to maintain a map that contains available languages names,
    When button is pressed, pass the language name to the function.

    QObject *obj=NULL;
    ILangInterface *LangObj= NULL;
    void Widget::setLanguageName(QString lname) {
       if(m_PluginMap.contains(lname) {
               QPluginLoader loader;
               loader.setFileName(m_PluginMap.value(lname));
                   if(loader.load()){
                       obj=loader.instance();
                       if(obj){
                           LangObj=qobject_cast<ILangInterface*> (obj);
                   }
               }
       }   
    }
    

    [Added code tags, please use them in future posts ~kshegunov]



  • How can i get the plugin renamed

    and how can we provide
    qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboardplugin_french"));
    option like this, ?.

    Or how it can be done?.

    Please provide guidance,

    Thanks,



  • @Pradeep-Kumar ,

    Go to the plugin location, rename it and load it.



  • Im asking this question because we need to use qtvirtualkeyboard, for raspberry board, and visintek board, so i had posted multiple questions in forum regarding thevvirtual keyboard,and require help badly, Need to have virtualkeyboard in 5 languages and i will be using sample app, whch contains QCombobox to select the language and QLineedit where we get virtualkeyboard on clicking.

    What i have achieved till now:

    1. compiled qtvirtualkeyboard from the path : Qt5.7.0/5.7/Src/qtvirtualkeyboard/src/virtualkeyboard.
    2. wrote sample app to load virtualkeyboard, which is working.

    What needs to be achieved:

    1. on select of language in first screen, need to get the corresponding language in second screen, on click on lineedit., yet to achieve.
    2. As only one libqtvirtualkeyboard.so will be generated,
      changed in .pro file also, as qtvirtualkeyboardplugin_french getting the lib as libqtvirtualkeyboard_french.so , in sample app virtual keyboard is not showing up.

    Please provide guidance.

    Thanks,



  • As u can see the image, after i renamed in .pro file , got the plugin name as libqtvirtualkeyboardplugin_french.so, further how can i use this, please provide guidance?.
    for loading into sample app for getting french keyboard?.

    alt text

    Thanks,


Log in to reply
 

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