Your cart is currently empty!
How to Install Qt to Develop GUI Apps on Linux
If you want to build powerful GUI apps on Linux, Qt is a solid choice. It’s open-source, cross-platform, and supports C++ (plus Python with PyQt or PySide). Installing Qt on Linux isn’t hard, but there are a few routes you can take. Here’s the most straightforward way to get up and running.
1. Pick Your Installation Method
You have two main options:
- Qt Online Installer: Get the latest official version and tools from Qt.
- Your Linux Distribution’s Package Manager: Faster and easier, but may not give you the newest version.
If You Want the Latest Qt (Recommended for Most Users):
A. Download the Qt Online Installer
- Go to the Qt Downloads page.
- Click “Go open source” and download the online installer for Linux (
.run
file).
B. Run the Installer
Open a terminal, go to the download folder, and make the installer executable:
cd ~/Downloads
chmod +x qt-unified-linux-x64-*.run
./qt-unified-linux-x64-*.run
Note: The filename may vary depending on the version.
C. Follow the GUI Steps
- Sign up or log in with a Qt account.
- Choose the Qt version and components you want (Qt 6.x or 5.x, Desktop development, etc.).
- Choose the install location (default is usually fine).
D. Add Qt to Your Path (Optional but Useful)
To use qmake
and other tools from the terminal, add Qt’s bin
folder to your PATH
. For example:
export PATH=$PATH:$HOME/Qt/6.7.0/gcc_64/bin
You can add this line to your ~/.bashrc
or ~/.zshrc
file.
If You Want the Fastest Way (May Be Older Qt Version):
On Ubuntu/Debian:
sudo apt update
sudo apt install qtcreator qtbase5-dev qt5-qmake
On Fedora:
sudo dnf install qt-creator qt5-qtbase-devel
On Arch Linux:
sudo pacman -S qtcreator qt5-base
You’ll probably get Qt 5.x. For Qt 6.x, use the online installer.
2. Launch Qt Creator
Once installed, launch Qt Creator from your application menu or type qtcreator
in a terminal.
- Create a new project (choose a “Qt Widgets Application” or “Qt Quick Application”).
- Build and run to make sure everything works.
3. (Optional) Install PyQt or PySide for Python
Prefer Python over C++? Install PyQt or PySide:
# For PyQt5
pip install PyQt5
# For PySide6
pip install PySide6
That’s It — You’re Ready to Build!
Qt gives you the tools to make sleek, native-feeling Linux GUI apps. Whether you code in C++ or Python, you’re set up. If you run into issues, check your Linux distro’s documentation or visit the Qt Forums.
Happy coding!
Tech enthusiast and content creator passionate about making technology simple for everyone. I share practical tips, guides, and reviews on the latest in computers, software, and gadgets. Let’s explore the digital world together!