← 返回命令列表

Linux command

qtchooser 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

List

qtchooser --list-versions

Example

qtchooser --print-env

Run tool

qtchooser --run-tool=[qmake] --qt=[5]

Install

qtchooser --install [version_name] [path/to/qmake]

Example

qtchooser --help

说明

qtchooser manages multiple Qt installations on a system. It allows developers to switch between different Qt versions (Qt4, Qt5, Qt6) for building applications. The tool wraps Qt development binaries (qmake, moc, uic, etc.) and directs them to the selected Qt installation based on configuration files or command-line options.

参数

--list-versions
List available Qt versions
--print-env
Print Qt environment variables
--run-tool _tool_
Run specified Qt tool
--qt _version_
Select Qt version to use
--install _name_ _path_
Register a Qt installation
-qt=_version_
Short form of --qt, accepted directly on wrapper binaries (e.g. `qmake -qt=5`).
-run-tool=_tool_
Short form of --run-tool.
-list-versions, -print-env
Single-dash aliases of the corresponding long options.

FAQ

What is the qtchooser command used for?

qtchooser manages multiple Qt installations on a system. It allows developers to switch between different Qt versions (Qt4, Qt5, Qt6) for building applications. The tool wraps Qt development binaries (qmake, moc, uic, etc.) and directs them to the selected Qt installation based on configuration files or command-line options.

How do I run a basic qtchooser example?

Run `qtchooser --list-versions` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --list-versions do in qtchooser?

List available Qt versions