I need to combine some code I have written myself.

  • The main program is written in LabVIEW and has C-style DLLs calls, where the DLLs contain C++ code with Qt.
  • The second part is written entirely in Qt.

I tried to integrate the second part in my LabVIEW code, but this is not trivial because of the threads, signals/slots, event handling, ... Therefore, I postponed this to later and would now like to use QProcess as a solution.

I need to pass a lot of parameters from the main program to the second application. These range from strings to ints, floats, doubles, ... I thought I could use the 'arguments' of void QProcess::start( const QString & program, const QStringList & arguments) . I am not sure how to handle this however.

  • Format all parameters into QStrings and append them to the QStringList.
  • Construct a QDataStream based on a QByteArray, serialize all date in there, and construct a QString based on this. I suppose however that I can run into troubles because of '0' bytes, and have to use QT_NO_CAST_FROM_ASCII to avoid strange things happening to the data.

Or is there a more elegant way? Any suggestions?