PDA

View Full Version : Virtual Keyboard + Touchscreen



javi
23rd January 2009, 08:16
Hi to everyone,

I'm new on Qt, and I would like to know if there's any library to load a Virtual Keyboard on a Touchscreen, or if there's any way to do it. I've looked for it, and I found nothing :-S

I'm developing a C++ application with Qt 4 that will run on a linux OS, and has a touchscreen on it.

Some help would be appreciated.

Thanks in advance,

Javi

seneca
23rd January 2009, 11:14
http://www.qt-apps.org/content/show.php/QVKeyboard?content=77983

Did not work for me because it is only for X11, and I am developing for windows.
You may have more luck with it since you are on linux.


I finally made my own classes that work on windows (and should also work on other Qt platforms basically). I can't release it however because it is part of a commercial project and I don't have time to isolate it in a separate lib.

Numeric: (http://ibk-software.com/bps2cpp/class_bps_numeric_keyboard.html)

http://ibk-software.com/bps2cpp/virtual_kbd_num.png

Swiss German: (http://ibk-software.com/bps2cpp/class_bps_swiss_german_keyboard.html)

http://ibk-software.com/bps2cpp/virtual_kbd_sg.png

javi
23rd January 2009, 13:40
Thank you very much. I've downloaded it and has given me some compilation errors and dependencies. I'll try to work on it this weekend.

As soon as i got it running i'll make you know it.


Thks again!

Javi

javi
26th January 2009, 12:28
Hi Seneca,

As i said the last post, when i decompressed it and try to compile, i had some errors. I write the steps i did and the error it gave to me:


qmake -project
qmake
make

Errors:

mainfrm.cpp:18:24: error: QDomDocument: File or directory doesn't exist
mainfrm.cpp:19:23: error: QDomElement: File or directory doesn't exist

The content of mainfrm.cpp[18,19]

#include <QDomDocument>
#include <QDomElement>

changes i did:

#include <QtXml/qdom.h>


make clean
make

Errors:

[...]
g++ -o qvkeyboard main.o mainfrm.o qmybutton.o moc_mainfrm.o moc_qmybutton.o
-L/usr/lib -lQtGui -lQtCore -lpthread
mainfrm.o: In function `mainForm::sendKey(unsigned int, bool, bool)':
mainfrm.cpp:(.text+0x3a2): undefined reference to `XTestFakeKeyEvent'
[...]

Do you know why i have this compilation error? If you compile it on linux, do you have the same error? Can you help me again, please?

Thanks in advance,

Javi

seneca
26th January 2009, 13:06
Sorry, as I wrote I needed to make my own cross-platform capable vkb, because that one on qt-apps is for linux only and I needed one for windows. I did not compile that package, just viewed it.

From the message it seems that it only lacks some testing code, so maybe just deleting that references would do the trick.

javi
26th January 2009, 13:30
Hi again,

Finally i could compile it and make it work!!!

I just modified manually the last compilation line, changing:


g++ -o qvkeyboard main.o mainfrm.o qmybutton.o moc_mainfrm.o moc_qmybutton.o -L /usr/lib/ -lQtGui -lQtCore -lpthread

for:


g++ -Wall -g -o qvkeyboard main.o mainfrm.o qmybutton.o moc_mainfrm.o moc_qmybutton.o -L /usr/lib/ -lQtGui -lQtCore -lpthread -lQtXml -lQtXmlPatterns -lX11 -lXtst

Thank you again!


Javi