02-17-2012 11:17 PM - edited 02-17-2012 11:49 PM
I have a Qt application that runs well in the simulator. When a widget that needs the keyboard has focus the virtual keyboard pops up properly. The problem is, when a widget that does not need the keyboard has focus the VKB is still showing and has to be manually closed by the user.
Is the expected functionality of VKB that it auto-hides when not need by whatever has active focus? Is there some way to prgramatically hide the keyboard? I looked at the qbbvirtualkeyboard source, but it doesn't seem to have any include files in the system to use in my program. It looks like it is intended to be a quiet helper rather than something actively called.
An unrelated future question would be whether there is a way to access the "swipe down" gesture in Qt to open an application menu the way other native applications do.
Solved! Go to Solution.
02-18-2012 03:19 AM
try this code:
QBBVirtualKeyboard::instance().hideKeyboard();
02-18-2012 07:51 AM
Thanks for the reply. I get:
'QBBVirtualKeyboard' has not been declared
I take it I need to add an include to my source file, or something to my project file. Any ideas?
02-18-2012 10:52 AM
Sure, you have to include
#include"qbbvirtualkeyboard.h"
and link with -l blackberry -L /<wherever_you_cloned_QT_to>/Qt/stage/nto/armle
02-18-2012 11:32 AM
Ok, that compiles fine for armel but I don't have a device to test on.
When I try compiling for x86 to run in the simulator, I get the following error after adding in the linker statement:
/home/fiferboy/Qt/stage/nto/x86/usr/lib/qt4/plugin
ixelType)'
Maybe to do with the different version of openGL used for the x86? x86 uses OpenGL ES 1.0 and armel ises ES 2.0. Still, it seems like I am close now, I just want to test in the simulator.
02-18-2012 11:43 AM
02-18-2012 11:44 AM
I have 'QT += opengl' in my project file.
02-18-2012 11:47 AM
02-20-2012 10:23 PM
Yes, I checked and that was exactly what I meant: QGLPixmapData does not exist in QtOpenGL compiled for SImulator and it does exist in QtOpenGl compiled for Playbook.
Sad -(
02-20-2012 10:28 PM
Yeah, so I can't test that function in the simulator. I built an arm version and got a friend to test on the playbook but the application wouldn't launch. It does launch without that function.
I'll try again when I get some hardware I can test further on with more debugging. Thanks for the help.