Skip to content
  • 0 Votes
    13 Posts
    4k Views
    jsulmJ

    @Naim Use http://doc.qt.io/qt-5/qprocess.html#readyReadStandardOutput and http://doc.qt.io/qt-5/qprocess.html#readyReadStandardError to get notifications each time the process writes something to stdout or stderr and read it using http://doc.qt.io/qt-5/qprocess.html#readAllStandardOutput and http://doc.qt.io/qt-5/qprocess.html#readAllStandardError. Do not call waitForFinished, just make sure your proc does not go out of scope (make it class member).

  • 0 Votes
    13 Posts
    28k Views
    J

    @SGaist Good one! Though I had to use the C++11 version since C++14 is still in Debian Sid.

    // C++11 connect(process, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this, &MainWindow::close);

    For those who want to know, this is the C++14-version:

    // C++14 connect(process, qOverload<int, QProcess::ExitStatus>(&QProcess::finished), this, &MainWindow::close);

    Since the actual problem of this thread is solved, I will mark this thread as solved tomorrow. In the mean time comments on the above code can be made.

  • 0 Votes
    2 Posts
    2k Views
    I

    I updated freetds from 0.91 (gentoo stable) to 1.0 (unstable which got added only a few days ago). Now I can use SELECT. Fingers crossed.