Writing:

QLineEdit * lineEdit = new QLineEdit(this); connect(lineEdit, SIGNAL(textChanged()), this, SLOT(showAll())) 

The showAll slot applies the ->show(); method to all other widgets ->show(); , the problem is that the connect bundle does not work, neither with twxtChanged nor with textEdited , QString served signals as input and did not submit anything, it still does not work. Called separately from the connection, the salt works.

    1 answer 1

    It is necessary so:

     connect(lineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(showAll())); 
    • Thank you, but I can not understand why write exactly Qstring &? - BlackOverlord
    • A signal is a normal function that can be redefined. The signal signature when performing the connection should be retained. - alexis031182