Improved QProcess handling