Qt No such slot for the QProcess::finished() signal

后端 未结 3 1135
[愿得一人]
[愿得一人] 2020-12-21 00:27

I am trying to run a command line program, gphoto2 from my Qt app running in Linux and read the results that it outputs to Standard Output and Standard Error. The GUI in th

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-21 01:31

    Or with C++14 (modern compilers)

    QObject::connect(cameraControl, qOverload(&QProcess::finished), this, &MainWindow::on_cameraControlExit);
    

    Or in the Qt5 convention:

    QObject::connect(cameraControl, static_cast(&QProcess::finished), this, &MainWindow::on_cameraControlExit);
    

提交回复
热议问题