Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
fiferboy
Posts: 13
Registered: ‎02-17-2012
My Device: Torch 9600, Playbook

Re: Hiding virtual keyboard in Qt?

BGMot's original solution was correct (thanks for the help!), but I had to figure out the system setup to go with it. Adding the following to my .pro file:

 

INCLUDEPATH += /home/fiferboy/qt-qnx/src/plugins/platforms/blackberry
LIBS += -L/home/fiferboy/qt4.8-playbook-linux/plugins/platforms
LIBS += -lblackberry

 

I am working with prebuilt libraries from https://github.com/blackberry/Qt/downloads but you still need the source to include qbbvirtualkeyboard.h

 

I have tested this on my brand new PlayBook, but haven't confirmed if it works in the simulator yet.

Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook

Re: Hiding virtual keyboard in Qt?

You will not be able to build this for Simulator. -(

Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook

Re: Hiding virtual keyboard in Qt?

Poking around source code found more elegant way of hiding/showing virtual keyboard. 

To hide keyboard:

	QEvent event(QEvent::CloseSoftwareInputPanel);
	QApplication::sendEvent(<your widget here>, &event);

 

To show keyboard:

    QEvent event(QEvent::RequestSoftwareInputPanel);
    QApplication::sendEvent(<your widget here>, &event);

 

Works on both device and simulator and no need to hack QBBVirtualKeyboard -)