The Qt library is used to build the UI for Wireshark and is used to provide a platform independent UI. Wireshark can be built with Qt 5.12 or later, but looks for Qt 6 as the default version.
To enable builds with Qt 5.x, the command-line option
-DUSE_qt6=OFF has to be set for cmake.
For more information on the Qt libraries, see Section 12.2, “The Qt Application Framework”.
Most Linux distributions provide Qt and its development libraries as standard packages. The required libraries and tools will likely be split across several packages. For example, building on Ubuntu requires qt6-tools-dev, qt6-tools-dev-tools, libqt6svg6-dev, qt6-multimedia-dev, and possibly others.
The Qt Project provides an installation tool for macOS, similar to Windows. It is available at https://www.qt.io/download-open-source/#section-2.
Qt 6 must be installed manually from the Qt installers page https://www.qt.io/download-open-source/#section-2 using the version of Qt appropriate for your compiler.
The CMake variable CMAKE_PREFIX_PATH (see
https://doc.qt.io/qt-6/cmake-get-started.html) should be set to your Qt installation directory, e.g. C:\Qt\6.5.3\msvc2019_64.
Alternatively you can also use the environment variable WIRESHARK_QT6_PREFIX_PATH.