I faced an error and I didn't found any solutions for this problem. So I have made a subclass from QLineEdit, and overrided a keyPressEvent method. Now if I try to write something it doesn't allow it, but it triggers the event. Any advices?
.h
class PlayerQLineEdit : public QLineEdit
{
public:
PlayerQLineEdit();
void keyPressEvent(QKeyEvent *);
};
.cpp
PlayerQLineEdit::PlayerQLineEdit()
{
setDisabled(false);
}
void PlayerQLineEdit::keyPressEvent(QKeyEvent *)
{
}