Solved wince6.0 Qt4.7 Keyboard key error
-
The function of the S key on the keyboard has been deleted.
I don't know what happen. I can't find the bug.detail: QLineEdit , keyboard input a , and input s, a will be deleted ,just s.
Have any seniors solved this problem?
I need help! ~
///(^v^)\~ -
Hi,
Beside the fact that Qt 4 has reached end of life a long time ago, you should at least consider updating to the latest release of the series if you can't upgrade to Qt 5.
Your description is a bit light on details. What keyboard ? Physical ? Virtual ? Does it also happens with a dummy application containing only a line edit ? Did you modify that line edit ? Added a validator ? An input mask ?
-
@SGaist said in wince6.0 Qt4.7 Keyboard key error:
Physical
Physical keyboard . QT5 not support wince6.
-
You do realize that you answered only two of all the questions I asked ?
-
if not run qt4 application, keyboard input no problem,
also run Qt4 application, wince system keyboard input no problem.the bug just in qt4 application, i don't changed any other setting.
-
Again, you did not answer all of my questions.
What do you mean by system keyboard ?
-
For example: I create a folder, change the name of the folder, the physical keyboard is normal
However, when inputting in the QLineEdit control(also QTableWidget too), the above phenomenon occurs on the physical keyboard
sorry, my english not good.
-
Wince's own virtual keyboard does not have this problem
-
There is also this phenomenon: long press the s button, you can enter s
-
What kind of keyboard is that exactly ?
Are you using any special locale ? -
I come from China,
use English keyboard.
I think not use any special locale.just the key "s" has problem, All other keys are normal.
-
Let me summarize the problem:
1 wince system virtual keyboard no problem;
2 physical keyboard is normal when use in wince system
For example, I create a folder and then change the name of the folder,
3 The s key has the same function as BackSpace key
4 If I press and hold the s button, can enter the s character normallyonly The s key has this problem
-
@CraigTao Is the keyboard maybe broken?
Did you configure the correct keyboard layout? -
I replaced keyboard, the problem still exists.
I don't configure keyboard layout. only the s key.
and
"2 physical keyboard is normal when use in wince system
For example, I create a folder and then change the name of the folder,"so. I think maybe Qt internal problem?
which part of Qt source code is handle system key message?
-
As I already suggested, first test with Qt 4.8.7.
-
When I debugged, I found something interesting
Inherit from class QLineEdit to implement a LineEdit
void LineEdit::keyPressEvent( QKeyEvent* pEvent )
{
int val = pEvent->key();
QString = pEvent->text();
QLineEdit::keyPressEvent(pEvent);
}key s character is ‘s' , but the key value is same as BackSpace : 16777219
-
What locale are you using ?
And again, please test against the latest version of the Qt 4 series. -
@SGaist thank you so much.
I can't update Qt version to 4.8.Now use a method to solve this problem.
bool VirtualRunQt::eventFilter( QObject* pObject, QEvent* pEvent ) { if (pEvent->type() == QEvent::KeyPress) { QKeyEvent *ke = static_cast<QKeyEvent*>(pEvent); if (ke->text() == "s" && ke->key() == 16777219) { QKeyEventHelp* pKey = reinterpret_cast<QKeyEventHelp*>(ke); pKey->k = 83; } } return QObject::eventFilter(pObject, pEvent); } qApp->installEventFilter(this);
but I still think this is a bug in Qt4.73
-
@CraigTao said in wince6.0 Qt4.7 Keyboard key error:
I can't update Qt version to 4.8
It's just to test whether it is an issue with older Qt version you're using.
-
I will test when I am free, now so busy.
How do I set the post to be resolved?