Important: Please read the Qt Code of Conduct -

Add actions to QPushButton and QLineEdit

  • Hello !

    I'm doing wrong when I use QObject::connect with QPushButton and I think that my question can be useful. I have actually on QHBoxLayout : 1 QLabel, 1 QLineEdit, 3 QPushButton. We don't consider the QLabel. I wanted that the first QPushButton named "Select" permits find an executable file and writes the directory access in the QLineEdit. The second QPushButton named "Launch" permits launch the executable file and the third QPushButton permits arrets the executable file. If the program is closed, when we launch it again, he keeps the directory access and we have just to press the QPushButton to execute the executable file already registered.

    For understand what I said, I took this picture.

    alt text

    If someone may help me, thank you.

  • Lifetime Qt Champion


    QSettings to remember what you want between application relaunch.
    QProcess to handle the executable file.

  • Moderators

    and getOpenFileName to select the file.

Log in to reply