Building Qt 6.5 sub-modules

Extending the Qt 6.5 base install with various extra features from sub-modules.

Building Qt 6.5 submodules

Qt submodules contains various extra features not included in the base package, for example QtQuick, support for Wayland, CAN-BUS and so forth. For most parts, building the submodules is quite straightforward:

  1. download the source for the submodule you require
  2. extract the archive
    tar xf submodule-version.tar.xz
  3. Install any required dependencies
  4. Install any optional dependencies
  5. Optional: create a build directory and configure the build inside it
  6. Configure sources
    /opt/Qt/6.5.1/bin/qt-configure-module .
  7. Build the sources
    cmake --build . --parallel 4
  8. Install the result
    cmake --install .

The only thing you need to keep in mind is to build them in the correct order to satisfy various dependencies. The following (incomplete at this time) table describes the required dependency submodules and any development packages that are needed and also the build time on various systems.


Development and Qt Submodule dependencies
Module Required submodules Development packages required Description

Build time

Pi 4

Build time

Pine 64

Build time

Pi 3

Build time

AMD Ryzen 3600X

qtbase     Qt core, start with this. ~50m 184m    
qtimageformats   libmng-dev

Support for loading various extra image formats


qtsvg     Support for SVG vector graphics        
qtshadertools     Tools for the cross-platform Qt shader pipeline     ~12m  
qttools qtdeclarative

QDoc requires clang to be installed (See section about documentation above):

clang-11 libclang-11-dev libclang-common-11-dev

Various Qt tools:

qtserialbus     Serial bus (CAN bus, ModBus) support ~2m      
qtserialport qtserialbus   Serial port support < 1m      
qtlocation qtserialport   Positioning (GPS) and location (Map) services < 3m      
qtdeclarative qtshadertools   Qt Quick / QML ~85m     ~6m
qtmultimedia qtdeclarative

For ffmpeg backend (prefered backend since 6.5):
ffmpeg libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev

For gstreamer backend:
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-plugins-bad libgstreamer-plugins-bad1.0-dev gstreamer1.0-pulseaudio gstreamer1.0-tools gstreamer1.0-alsa

For pulseaudio support:
pulseaudio libpulse-dev

For plain ALSA:

Multimedia (audio/video) support

  • Audio play, record
  • Video play
  • Video input, capture
qtquick3d     A high-level API for creating 3D content and 3D user interfaces based on Qt Quick        
qtquick3dphysics     A physics engine for use with Qt Quick 3D        
qtsensors qtmultimedia   Support for various device sensors        
qtnetworkauth     Network authentication protocol support (OAuth) < 1m      
qtconnectivity   bluez libbluetooth-dev Bluetooth and NFC connectivity support        
qtwebsockets qtdeclarative   Websockets support ~1m      
qtwebchannel qtwebsockets   Enabled peer-to-peer communication between a server (QML/C++ application) and a client (HTML/JavaScript or QML application)        
qtcharts qtdeclarative   Charting controls ~10m      
qtwayland   libwayland-dev Wayland support ~10m      
qtvirtualkeyboard qtsvg   Provides on-screen keyboard ~4m      
qtwebengine qtdeclarative flex bison gperf libre2-dev libnss3-dev nodejs libdrm-dev libxdamage-dev libsnappy-dev WebEngine. N/A      

Support for gRPC

qthttpserver     Qt HTTP Server        
qtspeech     Text To Speech with Flite        
qt5compat     Unsupported Qt 5 compatibility code. ~2m      

TL;DR Building submodules

You can quickly configure, build and install the Qt submodules with (why not do it in simple for loop, I'll leave that as an excerise for the reader!):

/opt/Qt/6.5.1/bin/qt-configure-module . && cmake --build . --parallel 4 && cmake --install .