LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

qtchooser

Switch between multiple Qt installations

TLDR

List available Qt versions
$ qtchooser --list-versions
copy
Print environment info
$ qtchooser --print-env
copy
Run tool with specific Qt version
$ qtchooser --run-tool=[qmake] --qt=[5]
copy
Install Qt version entry
$ qtchooser --install [version_name] [path/to/qmake]
copy
Display help
$ qtchooser --help
copy

SYNOPSIS

qtchooser [--list-versions] [--print-env] [--run-tool tool --qt version] [--install name path]

DESCRIPTION

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.

PARAMETERS

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

CONFIGURATION

/usr/share/qtchooser/

System-wide Qt version configuration files, each specifying bin and lib paths for a Qt installation.
~/.config/qtchooser/
User-level Qt version configuration files overriding system defaults.
QT_SELECT
Environment variable selecting the default Qt version (e.g., qt5, qt6).

INSTALL

sudo apt install qtchooser
copy
sudo dnf install qtchooser
copy

CAVEATS

Not all distributions use qtchooser; Debian/Ubuntu still do, but Fedora and Arch dropped the wrapper in favor of qualified binary names (`qmake-qt5`, `qmake6`). Qt 6 installations frequently do not register themselves — you may need to --install them manually.

HISTORY

qtchooser was created to handle the transition between Qt4 and Qt5 on Linux systems, allowing both versions to coexist while maintaining compatibility with build systems.

SEE ALSO

qmake(1), moc(1), qt-select(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid