PDA

View Full Version : QLineEdit doesn't recive any character



nemaider
1st June 2021, 16:38
Hello guys,

I have got problem with QLineEdit class.
I want to create lineedit object and it working, but if I running my program this input doesn't recive character that I press.
I tried to use releaseKeyboard() method, setting focus on this object too, but this still doesn't working.

My code:



QLineEdit * nicknameField = new QLineEdit();
nicknameField->setPlaceholderText("Enter your nickname");
nicknameField->setGeometry(pxPos,260,200,30);
scene->addWidget(nicknameField);



PS. If it can help I working on CLion IDE with Qt5 library on windows 10.

ChrisW67
2nd June 2021, 09:45
This line edit is clearly part of a larger construct that we cannot see.
What would help is a small, self-contained program that demonstrates the problem. Generally doing this will make the problem disappear (i.e. the problem was elsewhere in your larger program) or become obvious.