I have a weird problem with my Motorola MC75a in a graphicsview based application.
Hardware "s" button acts like a "backspace" button. Im using Windows Mobile 6.5 and qt 4.7. I've asked the Qt Support for this problem but they told that "Unfortunately we don't have such a device here at the moment, but I cannot reproduce a problem with a non full qwerty device because we only translate the numbers in that case. If you use the on screen keyboard then can you reproduce the problem then or is it only with the hard keyboard?".
I've tested this problem on full qwerty and non-full qwerty device.
Can anyone has a simple solution for my problem
Added after 1 33 minutes:
Ok, i have a solutions.
you must install a eventfilter to qapplication object in main.cpp. Filter Class should look like this :
class KeyboardFilter
: public QObject{
public:
KeyboardFilter(){};
{
if (e
->type
() == QEvent::KeyPress) {
if (keyPress->nativeScanCode() == 105)
{
83,
keyPress->modifiers(),
keyPress->text(),
keyPress->isAutoRepeat(),
keyPress->count());
return true;
}
}
return QObject::eventFilter(object, e
);
}
};
class KeyboardFilter : public QObject
{
public:
KeyboardFilter(){};
bool eventFilter(QObject *object, QEvent *e)
{
if (e->type() == QEvent::KeyPress)
{
QKeyEvent* keyPress = (QKeyEvent*)e;
if (keyPress->nativeScanCode() == 105)
{
QKeyEvent* sKeyPress = new QKeyEvent(QEvent::KeyPress,
83,
keyPress->modifiers(),
keyPress->text(),
keyPress->isAutoRepeat(),
keyPress->count());
QApplication::sendEvent(object, sKeyPress);
return true;
}
}
return QObject::eventFilter(object, e);
}
};
To copy to clipboard, switch view to plain text mode
that should do the trick.
Pozdro.
Bookmarks