DNF Install Qt

These packages provide the core libraries, development headers, and common modules for Qt6.

Bash

# Core Qt6 development files (essential)
sudo dnf install qt6-qtbase-devel

# QML and Qt Quick development
sudo dnf install qt6-qtdeclarative-devel

# SVG image support
sudo dnf install qt6-qtsvg-devel

# Multimedia framework
sudo dnf install qt6-qtmultimedia-devel

# Tools like Assistant and Designer
sudo dnf install qt6-qttools-devel

# WebEngine support for embedding web content
sudo dnf install qt6-qtwebengine-devel

# 3D rendering and graphics
sudo dnf install qt6-qt3d-devel

# Charts module
sudo dnf install qt6-qtcharts-devel

# For Wayland support
sudo dnf install qt6-qtwayland-devel

2. Qt5 Packages (For Maintaining Older Projects)

If you need to work on existing projects built with Qt5, these are the equivalent packages. It is safe to have both Qt5 and Qt6 development packages installed simultaneously.

Bash

# Core Qt5 development files (essential)
sudo dnf install qt5-qtbase-devel

# QML and Qt Quick development
sudo dnf install qt5-qtdeclarative-devel

# SVG image support
sudo dnf install qt5-qtsvg-devel

# Multimedia framework
sudo dnf install qt5-qtmultimedia-devel

# Tools like Assistant and Designer
sudo dnf install qt5-qttools-devel

# WebEngine support for embedding web content
sudo dnf install qt5-qtwebengine-devel

# 3D rendering and graphics
sudo dnf install qt5-qt3d-devel

# Charts module
sudo dnf install qt5-qtcharts-devel

# For Wayland support
sudo dnf install qt5-qtwayland-devel

# Legacy X11 development
sudo dnf install qt5-qtx11extras-devel

3. Qt Creator IDE and Documentation

Qt Creator is the official cross-platform IDE for Qt development. The version in the Fedora repositories is a good starting point. The documentation and example packages are highly recommended.

Bash

# Install the Qt Creator IDE
sudo dnf install qt-creator

# Qt6 Documentation, Examples, and Source Code
sudo dnf install qt6-doc qt6-qtbase-examples

# Qt5 Documentation, Examples, and Source Code
sudo dnf install qt5-doc qt5-qtbase-examples

All-in-One Command

Here is a comprehensive command that installs a robust development environment for both Qt6 and Qt5, including Qt Creator and documentation.

sudo dnf install qt-creator qt6-qtbase-devel qt6-qtdeclarative-devel qt6-qtsvg-devel qt6-qtmultimedia-devel qt6-qttools-devel qt6-qtwebengine-devel qt6-doc qt6-qtbase-examples qt5-qtbase-devel qt5-qtdeclarative-devel qt5-qtsvg-devel qt5-qtmultimedia-devel qt5-qttools-devel qt5-qtwebengine-devel qt5-doc qt5-qtbase-examples

After running these commands, Qt Creator should automatically detect the installed Qt versions, allowing you to configure kits and start building applications right away.