Python 运行设置
在Projects >Build & Run >Run >Run Settings 中为套件选择的运行设备上指定运行应用程序的设置。
下表总结了运行Qt for Python 应用程序的设置。
设置 | 值 |
---|---|
Python | Python 可执行文件的路径。 |
Buffered output | 将输出存储在缓冲区中。这可以提高输出性能,但会导致输出延迟。 |
Script | 显示将运行的项目主文件的路径。 |
Command line arguments | 要传递给可执行文件的命令行参数。 |
自定义可执行文件运行配置
要运行main.py
以外的其他 Python 文件,请创建自定义可执行文件运行配置:
- 选择Add >Custom Executable 。
- 在Executable 字段中,指定 Python 可执行文件的路径。
- 在Command line arguments 字段中,选择要运行的 Python 文件。
另请参阅 为项目激活工具包、配置项目以运行、创建Qt for Python 应用程序和开发Qt for Python 应用程序。
Copyright © The Qt Company Ltd. and other contributors. 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.