Important: Please read the Qt Code of Conduct -

On_toolButton_clicked() vs on_lineEdit_editingFinished()

  • I use "Qt Creator" to create QDialog.

    I put toolButton and lineEdit on QDialog.

    I input data to lineEdit fisrt,then press toolButton.

    void Dialog::on_toolButton_clicked() {......} first,
    then void Dialog::on_lineEdit_editingFinished() {......}

    but I hope
    void Dialog::on_lineEdit_editingFinished() {......} first,
    then void Dialog::on_toolButton_clicked() {......}

    How to do that?

    thanks a lot.

  • This is a brain to keyboard, but try to make three signals! You got the first two, but make an extra one that is called "on_toolButton_pressed()". This one can emit the on_lineEdit_Finished signal making that signal before the on_toolButton_clicked().
    Good luck

Log in to reply