hi experts,
My environment is linux openembedded , qt 4.7(embedded).
I'm implementing a onscreen keyboard. No physical keyboard is not attached to the device.
Using the following code Im sending the keypress events to the current window having lineedits.
int nKeyId = qstrKeyId.toInt(&bIsOk, 16);
QKeyEvent keyEvent
(QEvent::KeyPress,nKeyId,Qt
::NoModifier,qstrKeyIdString
);
if(focusWidget) /* send the key to focused widget */
{
}
QString qstrKeyId="0x01000001";
int nKeyId = qstrKeyId.toInt(&bIsOk, 16);
QString qstrKeyIdString=QChar(qstrKeyId.toInt(0, 16));
QKeyEvent keyEvent(QEvent::KeyPress,nKeyId,Qt::NoModifier,qstrKeyIdString);
QWidget *focusWidget = QApplication::focusWidget();
if(focusWidget) /* send the key to focused widget */
{
QApplication::sendEvent(focusWidget, &keyEvent);
}
To copy to clipboard, switch view to plain text mode
My problems are
1) when I press the onscreen tab key, the navigation is working good, but i cant see the blinking cursor in the lineedits.
when the line edit is having no texts , the blinking cursor in the lineedit is not visible.
But when the lineedit is having some texts, the blinking cursor in the lineedit is visible.
This problem is only with the openembedded. In Ubuntu pC, i can see the vertical beamer in the empty linedit.
In summarize, my problem is: when i press tab key, I cant find the vertical text cursor in the empty lineedits.
my question is: How to show the vertical beamer in the empty lineedit.
Im sending the tab key value(0x01000001) using sendevent, is there any problem?
2)when i press the tab, the backspace key functionality is not working.But backspace functionality is working well for otherkeys.
may be the focus problem affects this also. So, when pressing the tabkey, how to set the focus on the lineedit?
Any hints?
(sorry for the multiposting)
Thanks
Bala
Bookmarks