Results 1 to 12 of 12

Thread: Enabling Virtual Keyboard with Notepad Appllication?

  1. #1
    Join Date
    Jun 2009
    Location
    India
    Posts
    143
    Thanks
    16
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question Enabling Virtual Keyboard with Notepad Appllication?

    Hi,

    We have developed a notepad application in Qtopia. Now we need to use Virtual keyboard ( Input methods )which is available with Qtopia editions.

    So whenever i am opening Notepad application automatically QWERTY type keyboard should popup as Virtual Keyboard. How can i do this in Qtopia? Please help

  2. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Enabling Virtual Keyboard with Notepad Appllication?

    did you tried setting the QtopiaApplication::InputMethodHint ?

  3. #3
    Join Date
    Jun 2009
    Location
    India
    Posts
    143
    Thanks
    16
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Enabling Virtual Keyboard with Notepad Appllication?

    Quote Originally Posted by MrDeath View Post
    did you tried setting the QtopiaApplication::InputMethodHint ?
    Hi,

    Thanks to u r reply

    I haven't tried using that class...Let me try and let you know the result...

  4. #4
    Join Date
    Jun 2009
    Location
    India
    Posts
    143
    Thanks
    16
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question Re: Enabling Virtual Keyboard with Notepad Appllication?

    Quote Originally Posted by MrDeath View Post
    did you tried setting the QtopiaApplication::InputMethodHint ?
    Hi,

    We have found the above method, but we didn't knew how to use this one...Could you please paste some code on how to use this one ? It could be more helpful.

    We have plugin libraries available for all input methods in /plguin/inputmethods

    "libdockedkeyboard.so , libqkeyboard.so, libpredictivekeyboard.so

    Now is there any chance to link this plugins to our notepad application. So that the particular input method will popup when the application runs.

    Attached source files for reference if needed.
    Attached Files Attached Files

  5. #5
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Enabling Virtual Keyboard with Notepad Appllication?

    just use
    QtopiaApplication::setInputMethodHint() and pass the desired parameter...
    the plugins are loaded globaly for all aplications in qtopia.. you dont have to link your application to it..

  6. #6
    Join Date
    Jun 2009
    Location
    India
    Posts
    143
    Thanks
    16
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question Re: Enabling Virtual Keyboard with Notepad Appllication?

    Quote Originally Posted by MrDeath View Post
    just use
    QtopiaApplication::setInputMethodHint() and pass the desired parameter...
    the plugins are loaded globaly for all aplications in qtopia.. you dont have to link your application to it..
    Hi,

    We tried the following method in our main.cpp.

    Qt Code:
    1. #include "notepad.h"
    2. #include <QtopiaApplication>
    3.  
    4. int main(int argc,char **argv)
    5. {
    6. QtopiaApplication app(argc,argv);
    7. Notepad *note=new Notepad;
    8. QtopiaApplication::setInputMethodHint(QWidget *Notepad, InputMethodHint 2);
    9.  
    10. //QtopiaApplication::showInputMethod();
    11.  
    12. note->show();
    13.  
    14. return app.exec();
    15. }
    To copy to clipboard, switch view to plain text mode 

    We got a error InputMethodHint was not declared in this scope.

    We have a notepad class which is derived from QmainWindow.

    We really have no idea on setting input method....Could please help us by code , how to use the setInputMethod function....

  7. #7
    Join Date
    Jun 2009
    Location
    India
    Posts
    143
    Thanks
    16
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Enabling Virtual Keyboard with Notepad Appllication?

    Quote Originally Posted by MrDeath View Post
    just use
    QtopiaApplication::setInputMethodHint() and pass the desired parameter...
    the plugins are loaded globaly for all aplications in qtopia.. you dont have to link your application to it..
    Hi,

    Desperately waiting for your input...Please help...We are having a demo..

  8. #8
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Enabling Virtual Keyboard with Notepad Appllication?

    oh man... you are just not following simple c++??
    how do you pass parameters to a function?
    do it like this..

    Qt Code:
    1. QtopiaApplication::setInputMethodHint(note, QtopiaApplication::Text);
    To copy to clipboard, switch view to plain text mode 

  9. #9
    Join Date
    Jun 2009
    Location
    India
    Posts
    143
    Thanks
    16
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question Re: Enabling Virtual Keyboard with Notepad Appllication?

    Quote Originally Posted by MrDeath View Post
    oh man... you are just not following simple c++??
    how do you pass parameters to a function?
    do it like this..

    Qt Code:
    1. QtopiaApplication::setInputMethodHint(note, QtopiaApplication::Text);
    To copy to clipboard, switch view to plain text mode 
    Hi,

    Thanks for being patience to answer our silly questions ..We are new to C++ and we are learning to improve.

    We did the below method of passing parameters and its getting compiled with Qtopia make.

    Qt Code:
    1. QtopiaApplication::setInputMethodHint(note, QtopiaApplication::Text);
    To copy to clipboard, switch view to plain text mode 

    Once we run our notepad application , we didn't get virtual keyboard on our screen as popup.

    We are running notepad as a individual application not with Qtopia phone edition

    Whether virtual keyboard comes as popup or it will be added to task bar menu? We don't have a task bar in our application .

  10. #10
    Join Date
    Jun 2009
    Location
    India
    Posts
    143
    Thanks
    16
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Enabling Virtual Keyboard with Notepad Appllication?

    Quote Originally Posted by MrDeath View Post
    oh man... you are just not following simple c++??
    how do you pass parameters to a function?
    do it like this..

    Qt Code:
    1. QtopiaApplication::setInputMethodHint(note, QtopiaApplication::Text);
    To copy to clipboard, switch view to plain text mode 
    Hi,

    Any Idea on Virtual keyboard posted thread....

  11. #11
    Join Date
    Jun 2009
    Location
    India
    Posts
    143
    Thanks
    16
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Unhappy Re: Enabling Virtual Keyboard with Notepad Appllication?

    Quote Originally Posted by augusbas View Post
    Hi,

    Any Idea on Virtual keyboard posted thread....

    Hi,

    Any body there to help out to solve our problem posted.

  12. #12
    Join Date
    Jul 2008
    Location
    india
    Posts
    12
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: Enabling Virtual Keyboard with Notepad Appllication?

    use this

    setAttribute(Qt::WA_InputMethodEnabled);

    inside constructor. It works fine with mobile.

Similar Threads

  1. virtual keyboard done with qt4-designer
    By Klaus_EAN in forum Qt Programming
    Replies: 17
    Last Post: 30th December 2010, 08:47
  2. Virtual Keyboard?
    By augusbas in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 14th July 2009, 08:55
  3. How to create Virtual Keyboard ?
    By augusbas in forum Qt Programming
    Replies: 2
    Last Post: 9th July 2009, 10:11
  4. Q3ScrollView resists to scroll down to the garbage bin
    By sivrisinek in forum Qt Programming
    Replies: 0
    Last Post: 5th February 2009, 17:50
  5. Virtual Keyboard on Qtopia 4.2.1
    By shapirlex in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 11th April 2007, 15:51

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.