Cursor blinking
-
When hoding down Key_Enter in a textedit, the cursor stops blinking, turns on while key is down and when the key is released it starts to blink again.
I'm catching Key_Enter in keyPressEvent(QKeyEvent *e) like:
@if (e->key() == Qt::Key_Enter)
{
qDebug() << "Enter pressed!";
return;
}@The problem is, that even when holding down the enter key, the cursor always blinks, i.e. it wont turn on for the period of key down.
Please, how to fix this so that it looks like regular behavior?
-
Have you considered to "file a bug report":https://bugreports.qt-project.org/ ? Some information (Qt version used, OS you are running on) as well as a simple test case would help.
-
Thanks for the comment but are you sure this is a bug? Qt Creator, for instance, does the blinking correctly so perhaps there is just some trick how to force the blink timer to restart on keydown..?
-
I am not sure, I am not too deeply into the editor code of creator.
If you have a small example app that demonstrates that Qt is not behaving naturally on some platform, then please report a bug. That is the only reliable way to bring something to the attention of the developers working on that particular piece of code.
-