Obsolete Members for QProcess
I seguenti membri della classe ` QProcess ` sono deprecati. Sono forniti per garantire la compatibilità con il codice sorgente esistente. Si sconsiglia vivamente di utilizzarli nel nuovo codice.
Funzioni pubbliche
(deprecated in 4.6) QStringList | environment() const |
(deprecated in 4.6) void | setEnvironment(const QStringList &environment) |
Documentazione sulle funzioni membro
[deprecated in 4.6] QStringList QProcess::environment() const
Questa funzione è deprecata a partire dalla versione 4.6. Si sconsiglia vivamente di utilizzarla nel codice nuovo.
Restituisce l'ambiente che ` QProcess ` passerà al proprio processo figlio, oppure un ` QStringList ` vuoto se non è stato impostato alcun ambiente tramite ` setEnvironment()`. Se non è stato impostato alcun ambiente, verrà utilizzato l'ambiente del processo chiamante.
Vedi anche processEnvironment(), setEnvironment() e systemEnvironment().
[deprecated in 4.6] void QProcess::setEnvironment(const QStringList &environment)
Questa funzione è deprecata a partire dalla versione 4.6. Si sconsiglia vivamente di utilizzarla nel codice nuovo.
Imposta l'ambiente che QProcess passerà al processo figlio. Il parametro environment è un elenco di coppie chiave=valore.
Ad esempio, il codice seguente aggiunge la variabile d'ambiente ` TMPDIR`:
QProcess process;
QStringList env = QProcess::systemEnvironment();
env << "TMPDIR=C:\\MyApp\\temp"; // Add an environment variable
process.setEnvironment(env);
process.start("myapp");Nota: questa funzione è meno efficiente della funzione setProcessEnvironment().
Vedi anche environment(), setProcessEnvironment() e systemEnvironment().
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.