Obsolete Members for QProcess

クラスQProcess の以下のメンバーは非推奨です。これらは古いソース・コードの動作を維持するために提供されています。新しいコードでは使用しないことを強くお勧めします。

パブリック関数

(deprecated) QStringList environment() const
(deprecated) void setEnvironment(const QStringList &environment)

メンバ関数ドキュメント

[deprecated] QStringList QProcess::environment() const

この関数は非推奨である。新しいコードでは使用しないことを強く推奨する。

QProcess が子プロセスに渡す環境、またはsetEnvironment() で環境が設定されていない場合は空のQStringList を返す。環境が設定されていない場合は、呼び出し元のプロセスの環境が使用される。

processEnvironment()、setEnvironment()、systemEnvironment()も参照して ください。

[deprecated] void QProcess::setEnvironment(const QStringList &environment)

この関数は非推奨である。新しいコードでは使用しないことを強く推奨する。

QProcess が子プロセスに渡す環境を設定する。パラメータenvironment は key=value のペアのリストです。

例えば、以下のコードは環境変数TMPDIR を追加する:

QProcess process;
QStringList env = QProcess::systemEnvironment();
env << "TMPDIR=C:\\MyApp\\temp"; // Add an environment variable
process.setEnvironment(env);
process.start("myapp");

注意: この関数はsetProcessEnvironment() 関数より効率が悪い。

environment()、setProcessEnvironment()、systemEnvironment()も参照の こと。

© 2025 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.