Solved QLineEdit not receiving any input
-
Hi,
What might I be doing wrong with this QLineEdit? It's showing the cursor as expected on getting focus, but when it's focused and I'm mashing keyboard, it's not receiving any input :(
-
Hi @feuer
I am not sure at all but the source of the problem can be this line:
Can you try to comment this line ?
maybe there is a widget that will be place on top of your lol QLineEdit.
-
Hi, thanks, but commenting that out did nothing :( In fact, when I first noticed that the property-editor dialog had a QLineEdit that received no input I tried to add that particular eventHandler. Afterwards I added the QLineEdit to tha mainwindow to ease testing and experimenting.
-
Hi
That code alone seems pretty ok.
If you create a default GUI project and pasteQLineEdit *lol = new QLineEdit(this); lol->setFocus(); lol->setPlaceholderText("Would you please capture events?"); lol->setReadOnly(false);
Does it then work ?
-
It was because my half-finished openglwidget was eating my keyboard events. This commit fixed it.
Thanks for the chance of rubber duck debugging :D