Results 1 to 10 of 10

Thread: Virtual Keyboard

  1. #1
    Join Date
    Apr 2008
    Posts
    196
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    1

    Default Virtual Keyboard

    Hey @all,

    i search a virtual keyboard for a touchscreen in Qt, currently with a german or english layout.

    I have tried to build some with and without Qt Designer and also QSignalMapper but i doesn't work how i want and it looks terrible ugly too.

    Can anybody help me? Please post nothing with Qtopia

    Regards

    LG NoRulez

  2. #2
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Virtual Keyboard

    u havent mentioned where the output of clicking a keyboard button will go, but assuming its a textedit box, here's how you go about it:

    use designer to create the buttons, connect the click to a slot where u set text with the button character. For e.g. if u click button 'a', on the slot, u append character 'a' to the textedit. but i guess u must have already tried that. so where is the click button's output going?

  3. #3
    Join Date
    Apr 2008
    Posts
    196
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    1

    Default Re: Virtual Keyboard

    The output is going into a QLineEdit.

    My Problem is the design of the buttons, the design locks ugly but maybe you have an example on how to draw/design it, for example the TABS/CAPS key is a bit larger the the "^" key and so.

    Regards
    NoRulez

  4. #4
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Virtual Keyboard

    it'd be better to use pixmaps on buttons than to draw every button

    http://www.techonthenet.com/clipart/keyboard/index.php

    u can find related images on the above link..just arrange them as in keyboard..shouldnt be a problem

  5. #5
    Join Date
    Apr 2008
    Posts
    196
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    1

    Default Re: Virtual Keyboard

    I don't draw every button, I only create QPushButton's for each key and place the buttons into a QGridLayout

  6. #6
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Virtual Keyboard

    yes, u r doing the right thing..now u just have to set pixmap on these buttons..from the images i sent u earlier..

  7. #7
    Join Date
    Apr 2008
    Posts
    196
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    1

    Default Re: Virtual Keyboard

    OK, i will try it

  8. #8
    Join Date
    May 2008
    Location
    duesseldorf, germany
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Virtual Keyboard

    I'd suggest that you do not use Pixmaps, even though this saves you time to design a nice look of your widget at the moment.
    The problem with pixmaps is that you'll have to provide one for each key, in every language, you can't scale this to nicely fit onto a screen, and such on.

    Either use a stylesheet (which is really nice as you can try this is designer / needs no recompile) or subclass QAbstractPushButton and paint the stuff on your own.

    And, may I ask which kind of touch device you're using ?
    As I'm working with a WACOM tablet using Linux/X11 and there are many issues when using a tablet and Qt ...
    You'll probably need to subclass in order to dispatch the tabletEvents() correctly either, as PushButtons are in many ways buggy using a tablet

  9. #9
    Join Date
    Apr 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Post Re: Virtual Keyboard

    hi,
    i am doing vitual keyboard in designer. how to implement code for F1, F2, Shift, Ctl, and Delete

    advanced thanks

  10. #10
    Join Date
    Jul 2010
    Posts
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows Symbian S60

    Default Re: Virtual Keyboard

    Hi,

    I am using HTC HD2 PDA Phone to deploy my application. When I select my QLineEdit or QTextEdit, there is no Virtual Keyboard appeared. I also tried Qt examples but got the same result. How can I get the build-in virtual keyboard? Or Need to create own?
    I have just tried Qt for Mobile and there are still a lot that I don't understand, yet.

    Thanks for your time,
    Lwin Htoo Ko

Similar Threads

  1. virtual keyboard done with qt4-designer
    By Klaus_EAN in forum Qt Programming
    Replies: 17
    Last Post: 30th December 2010, 09:47
  2. About qtopia an virtual keyboard
    By webquinty in forum Qt for Embedded and Mobile
    Replies: 6
    Last Post: 2nd March 2009, 09:35
  3. Q3ScrollView resists to scroll down to the garbage bin
    By sivrisinek in forum Qt Programming
    Replies: 0
    Last Post: 5th February 2009, 18:50
  4. How to Launch Virtual Keyboard on top of TouchScreen
    By arunvv in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 21st June 2007, 19:31
  5. Virtual Keyboard on Qtopia 4.2.1
    By shapirlex in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 11th April 2007, 16: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.