Important: Please read the Qt Code of Conduct -

Performance issues with detached QProcess

  • Hi everyone,

    I've built an interface in Qt which interacts with a camera and a projector for synchronized image capture. I am using a button linked to a QProcess command on the interface to launch an external process which sends images to the projector to trigger image capture.

    The issue is that, when I launch the process from this interface, the OpenGL instance created by the external process suffers greatly in performance, resulting in botched image captures. Such a performance drop is not experienced when running the process by itself. The only thing that I think might affect the new process is the 2 OpenGL instances running in the interface, but the external process itself does not do much processing at all: it just draws a square, binds a PNG image onto the surface, and refreshes at 60 Hz for all images.

    I was wondering if this is an issue with the way I have launched the program, or if its due to hardware limitations (the workstation does not have the highest specs. Thanks in advance! My launching code is included below:

    @ bool bStartSuccess;
    QString sProgram = CASIO_EXE_PATH;
    QString sProgramDir = CASIO_EXE_DIR;
    QStringList arguments;
    arguments << QString("%1").arg(pattern_list.count());
    QString sOldPath = QDir::currentPath();
    QDir::setCurrent( sProgramDir );
    QProcess *process = new QProcess(this);
    bStartSuccess = process->startDetached(sProgram, arguments);

  • Qt Champions 2017

    I don't suspect issue with process creation. Can you try with process->start API and QProcess::exec methods as well. Is it on Linux or Windows ?

Log in to reply