QProcess::startDetached() 和 QProcess start() 的替代品,因为它们已被弃用
Alternatives to QProcess::startDetached() and QProcess start() as they are deprecated
QProcess::startDetached()
和 QProcess::start()
有哪些替代方案可以启动外部应用程序,因为它们在 qt5 中被标记为已弃用?
只有 start()
和 startDetached()
方法的一些重载被弃用,例如:
void start(const QString &command, QIODevice::OpenMode mode = ReadWrite)
bool startDetached(const QString &command)
但其他人仍然可用:
void QProcess::start(const QString &program, const QStringList &arguments, QIODevice::OpenMode mode = ReadWrite)
void QProcess::start(QIODevice::OpenMode mode = ReadWrite)
bool QProcess::startDetached(qint64 *pid = nullptr)
bool QProcess::startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory = QString(), qint64 *pid = nullptr)
QProcess::startDetached()
和 QProcess::start()
有哪些替代方案可以启动外部应用程序,因为它们在 qt5 中被标记为已弃用?
只有 start()
和 startDetached()
方法的一些重载被弃用,例如:
void start(const QString &command, QIODevice::OpenMode mode = ReadWrite)
bool startDetached(const QString &command)
但其他人仍然可用:
void QProcess::start(const QString &program, const QStringList &arguments, QIODevice::OpenMode mode = ReadWrite)
void QProcess::start(QIODevice::OpenMode mode = ReadWrite)
bool QProcess::startDetached(qint64 *pid = nullptr)
bool QProcess::startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory = QString(), qint64 *pid = nullptr)