Unknown module(s) in QT: multimedia - c++

I have downloaded qt-everywhere-opensource-src-5.4.1 and build and installed static.
Next i built QMultimedia and installed.
I get "Unknown module(s) in QT: multimedia" from the .pro when including
QT += multimedia.
I have QtMultimedia,QtMultimediaQuick_p and QtMultimediaWidgets in /usr/local/Qt-5.4.1/include.
Also have mediaservice,playlistformats in /usr/local/Qt-5.4.1/plugins
Also have QtMobility,QtMultimediaKit in /usr/include
I am running Ubuntu 15.0
All related issues i've found did not help.

Please run:
sudo apt-get install qtmultimedia5-dev
afterwards you can install other multimedia packages as needed, but this enables the multimedia in general.

Related

Unknown module(s) in QT: webenginewidgets

Hi. I want to connect QtWebEngineWidgets. To do this, you need to write(https://doc.qt.io/qt-5/qtwebenginewidgets-module.html) in .cpp file
#include <QtWebEngineWidgets>
and
QT += webenginewidgets
inside .pro file.
The problem is that when writing to a .pro file, I get the error - Unknown module(s) in QT: webenginewidgets
Everywhere I read, it is only written that you need to connect the module in the .pro file, but it doesn’t work for me. Am I doing everything right?
• Qt Creator version - 5.0.0 Community
• Qt version - 6.1.3
• C++ compiler version - MSVC2019 64bit 17.032112.339(amd64)
UPD:
I want to add that this module is not in the installer.
Installer exaple1, Installer example2
It turned out that it was necessary to install a newer version of Qt. For example, since version 6.2.3.0 and newer, the installer contains the "WebView" item. I'm installing it now and I'll see if it helps. Thank you.
Possibly the needed files aren't installed. Try adding this package containing the development files:
sudo apt-get install qtwebengine5-dev

How to install Qt Serialport on macOS?

I'm trying to compile this code where the .pro file includes a
QT += serialport
gives me a
Project MESSAGE: Warning: unknown QT: serialport
error. Without Qt, I would use CMake and install the package via vcpkg, Conan, HomeBrew, or something like that. But not sure if Qt has its own package manager. I would appreciate it if you could help me know what is the most canonical way to install and include this library.
P.S.1. In the comments, I'm being told that I need to use Qt's Maintenance Tool, which is sorta the internal package manager for Qt, to install QtSerialPort module. Given that I don't know how to install that via HomeBrew, I installed Qt Creator from the Qt website. I found the Maintenance Tool in <install_dir> the installation folder /Users/<user>/Qt/MaintenanceTool.app which I could open from the terminal by open MaintenanceTool.app while being in that folder. However, I can not see any QtSerialPort module in the options, nor a way to search.
P.S.2. Posted a new question here.
P.S.3. I think this issue arises because I had multiple versions of Qt installed. once I searched for locate qmake and found out the other versions I have installed (e.g., /System/Volumes/Data/usr/local/Cellar/qt/5.14.1/bin/qmake) I could just run that and the MakeFile was generated.

How to install Qt on MacOS X Sierra and add qmake on terminal

I want to install Qt on my Mac and use the qmake through terminal to compile code. I downloaded the open source Qt Creator from Qt site, but I cannot set it up. Anyone with similar problems?
System: Mac OS X Sierra,
Qt version: 5.7.
I'm downloading the open source installer from qt.io/download-open-source . I'm installing it to Users/MyUserAccount and i want set it up so i can compile C++ code with qmake && make
Just to provide another solution using Homebrew.
As you've found QT4 isn't compatible with Mac OSX Sierra.
You can install QT5 using:
brew install qt5
But you'll find you can't access qmake from the command line. To rectify this you'll need to run:
brew link qt5 --force
If you want to run qmake from command line, add the directory where qmake is located to PATH environment variable. How to do it depends on the shell you are using, for bash it is done by adding export PATH=$PATH:<path_to_qmake> to either ~/.profile, ~/.bash_profile or ~/.bashrc.
For Installing QT4:-
https://github.com/cartr/homebrew-qt4
brew tap cartr/qt4
brew tap-pin cartr/qt4
brew install qt#4
For Installing QT5:-
brew install qt5

Missing QtWebKit headers + modules

I'm a newcomer to Qt and I'm having a hard time embedding a web browser control in my application.
When I try to #include <QtWebKit> or #include <QWebView>, the compiler complains that neither of those header files exist. The same goes for QtWebKitWidgets, as well.
When I add QT += webkit or QT += webkitwidgets in my qmake .pro file, I get an error saying Unknown module(s) in QT: webkit.
How do I install these modules / headers so I can use QWebView in my application? (My Qt version is 5.2.1.)
Try to install qtwebkit from repository.
On Ubuntu: sudo apt-get install libqt5webkit5-qmlwebkitplugin libqt5webkit5
On ArchLinux: sudo pacman -S qtwebkit
You may be missing your distro's QtWebKit dev package. Double check that you have the headers. A good command for this is find /usr/include -iname "*qtwebkit*". You should get some files back, one of them should be called QtWebKit, and if you open it in a text editor, you should see the text of the header.
In some distributions, the QtWebKit headers are in a separate package from the base Qt development files. Make sure you have that package installed if applicable. I know that in Arch Linux and Manjaro, the packages you need are qt5-base and qt5-webkit, and if I remember correctly, Debian-based distros (Debian, Ubuntu, Linux Mint, etc) call those packages qtbase5-dev and libqt5webkit5-dev.
If you are missing the package and need help finding it for your distribution, you can try asking over on SuperUser.

Force compilation with qt4 even if qt5 is installed

I'm on Ubuntu 14.04 and have both qt4 and qt5 installed (from the repositories). I thought I could switch between building with qt5 to building with qt4 simply with
sudo apt-get install qt4-default
But the program still builds with Qt5 and gives error because it only supports Qt4.
I checked the qmake version and after qt4-default is installed it gives
$ qmake --version
QMake version 2.01a
Using Qt version 4.8.6 in /usr/lib/x86_64-linux-gnu
I'm building with CMake in case that is useful. Also, if I do
sudo apt-get remove qtbase5-dev
then finally it builds with qt4.
EDIT: I am not using Qt Creator and would prefer a command-line solution
You would need to put this into your CMakeLists.txt:
find_package(Qt4 REQUIRED)
...
include_directories(${QT_INCLUDES})
target_link_libraries(main ${QT_QTCORE_LIBRARY})