Page 1 of 1

Wie kann ich feststellen, ob in QT ein Schlüssel wirklich veröffentlicht wurde?

Posted: 12 Mar 2025, 05:00
by Anonymous
I tried to override the keyReleaseEvent function, but it causes a loop call due to the automatic repetition when holding down a key, and using isAutoRepeat doesn't work (on Linux X11), as it always returns false.
Reproduce code (Linux X11 only):
#include
#include
#include
class Window : public QWidget {
public:
Window(QWidget* parent = nullptr): QWidget(parent) {}
void keyReleaseEvent(QKeyEvent* event) override {
if (!event->isAutoRepeat())//Normal on Windows
qDebug()
Derzeit glaube ich, dass der Grund wie in der Dokumentation erwähnt wird: < /p>

Beachten>