In my Qt project I've a QPushButton
and a QLineEdit
instances. And I want to set QLineEdit disabled when QPushButton is pressed.
I've written this code:
this->btn = new QPushButton(this);
this->txt = new QLineEdit(this);
QObject::connect(this->btn,SIGNAL(clicked(bool)),this->txt,SLOT(setDisabled(bool)));
which doesn't work. Can you help me please? What is my mistake?