How to install submodule Qtmultimedia on Fedora?
-
Thank you for your reply.
Did you check that your Kit is indeed using the pre-built binaries ?
I am a newbie of Qt Creator, so I have no idea how to check my kit is using the pre-build binaries...
Did you check the content of the lib folder in your Qt installation ?
The lib folder does not exist under my Qt directory but there are some directories named lib under /5.15.2. Such as /android, /gcc_64, /wasm_32. Others are under qt5/gnuwin32, qt5/qtbase, qt5/qtmultimedia. And last, under Tools/QtCreator.
-Qt/ |--/ 5.15.2 |-/android |-/gcc_64 |-/wasm_32
Do you have the same issue if you build your application from the command line ?
Not same issue.
After qmake and make, an error said:mainwindow.h:4:10: fatal error: QMainWindow: No such file or directory 4 | #include <QMainWindow> | ^~~~~~~~~~~~~ compilation terminated.
-
For verifying the kits go in the Qt Creator settings.
Since you are using your desktop Qt build you should check the content that is in gcc_64.
-
For verifying the kits go in the Qt Creator settings.
Since you are using your desktop Qt build you should check the content that is in gcc_64.
@SGaist
I checked Qt creator's setting.
Kits:- Desktop Qt 5.15.2 GCC 64bit
Qt Versions:
- Qt 5.15.2GCC 64bit(/Qt/5.15.2/gcc_64/bin/qmake)
Kits' compilers are
C:- GCC (/usr/bin)
- GCC (/usr/lib64/ccache)
- list itemGCC (/Qt/Tools/QtCreator/libexec/qtcreator/clang/bin)
C++:
- GCC (/usr/bin)
- GCC (/usr/lib64/ccache)
-
That part looks good.
What about the content of gcc_x64 lib and plugins folders ?
-
This is how I installed web engine module. It may be helpful for you.
git clone https://code.qt.io/qt/qtwebengine.git
cd qtwebengine
git checkout 5.15.2 ==>match the Qt version installed
git submodule update --init --recursive
mkdir build
cd build
qmake ../qtwebengine.pro -- -no-build-qtwebengine-core ==>core engine build has been installed, no need to rebuild
make -j4
sudo make install ==>automatically to the installed location of Qt-5.15.2 -
This is how I installed web engine module. It may be helpful for you.
git clone https://code.qt.io/qt/qtwebengine.git
cd qtwebengine
git checkout 5.15.2 ==>match the Qt version installed
git submodule update --init --recursive
mkdir build
cd build
qmake ../qtwebengine.pro -- -no-build-qtwebengine-core ==>core engine build has been installed, no need to rebuild
make -j4
sudo make install ==>automatically to the installed location of Qt-5.15.2 -
@JoeCFD it's not about QtWebEngine but QtMultimedia.
However, one good point: checkout the branch matching your release. By default it's dev and that one contains Qt 6 code.
-
There are so many, about 600, files in the gcc_64 lib. What kind of files should be in the directory?
Plugins folder has these folders:
- assetimporters
- audio
- bearer
- canbus
- designer
- egldeviceintegrations
- gamepads
- generic
- geometryloaders
- geoservices
- iconengines
- imageformats
- mediaservice
- platforminputcontexts
- platforms
- platformthemes
- playlistformats
- position
- printsupport
- qmltooling
- renderers
- renderplugins
- sceneparsers
- sensorgestures
- sensors
- sqldrivers
- texttospeech
- virtualkeyboard
- wayland-decoration-client
- wayland-graphics-integration-client
- wayland-graphics-integration-server
- wayland-shell-integration
- webview
- xcbglintegrations
-
This is how I installed web engine module. It may be helpful for you.
git clone https://code.qt.io/qt/qtwebengine.git
cd qtwebengine
git checkout 5.15.2 ==>match the Qt version installed
git submodule update --init --recursive
mkdir build
cd build
qmake ../qtwebengine.pro -- -no-build-qtwebengine-core ==>core engine build has been installed, no need to rebuild
make -j4
sudo make install ==>automatically to the installed location of Qt-5.15.2Thank you for your advice. I tried
$ git clone git://code.qt.io/qt/qt5.git
and$git checkout
and so forth.
At the point atmake -j4
errors came, which saidqt5/qtmultimedia/src/multimedia/qmediacontrol.cpp:136:10: fatal error: moc_qmediacontrol.cpp: No such file or directory 136 | #include "moc_qmediacontrol.cpp"
So I am doing
$ https://code.qt.io/cgit/qt/qtmultimedia.git
. -
The idea is that you look for the multimedia library and the plugins. The former should be something like libQt5Multimedia.so and you should have a subfolder named multimedia in the plugins folder.
Note that if you do not have the GStreamer development libraries installed, you won't have much in the multimedia part.
Did you do that from a clean state ?
-
The idea is that you look for the multimedia library and the plugins. The former should be something like libQt5Multimedia.so and you should have a subfolder named multimedia in the plugins folder.
Note that if you do not have the GStreamer development libraries installed, you won't have much in the multimedia part.
Did you do that from a clean state ?
Now Qt folder has multimedia and the install done:
$git clone https://code.qt.io/cgit/qt/qtmultimedia.git $cd qtmultimedia/ $git checkout 5.15.2 $git submodule update --init --recursive $cd ../qt_build $qmake ../qtmultimedia/qtmultimedia.pro -- $make -j4 $make install
No error happened but still
error: Qtmultimedia/QMediaPlayer: No such file or directory
occured.Note that if you do not have the GStreamer development libraries installed, you won't have much in the multimedia part.
No, I haven't installed GStreamer development yet...
-
The idea is that you look for the multimedia library and the plugins. The former should be something like libQt5Multimedia.so and you should have a subfolder named multimedia in the plugins folder.
Note that if you do not have the GStreamer development libraries installed, you won't have much in the multimedia part.
Did you do that from a clean state ?
-
After installation, you will be able to find this.
5.15.2/gcc_64/include/QtMultimedia
In the .pro file, add multimedia
QT += core gui widgets xml multimediaHello,
After installation, you will be able to find this.
5.15.2/gcc_64/include/QtMultimediaYes, I can find it.
I uninstalled Qt creator and reinstalled it. Then I did:
$git clone https://code.qt.io/cgit/qt/qtmultimedia.git $cd qtmultimedia/ $git checkout 5.15.2 $git submodule update --init --recursive $cd ../qt_build $qmake ../qtmultimedia/qtmultimedia.pro -- $make -j4 $make install
No error has come. I wrote
QT += core gui widgets xml multimedia
in .pro file and
#include <Qtmultimedia/QMediaPlayer>
into mainwindow.h file.
But IDE says "Qtmultimedia/QMediaPlayer not found" and "You need to set an executable in the custom run configuration".What am I missing?
-
It's QtMultimedia.
However, the use of the module prefix recommandation has been dropped since Qt 5.0 if not before.
-
It's QtMultimedia.
However, the use of the module prefix recommandation has been dropped since Qt 5.0 if not before.
-
It's QtMultimedia.
However, the use of the module prefix recommandation has been dropped since Qt 5.0 if not before.
-
Hello,
After installation, you will be able to find this.
5.15.2/gcc_64/include/QtMultimediaYes, I can find it.
I uninstalled Qt creator and reinstalled it. Then I did:
$git clone https://code.qt.io/cgit/qt/qtmultimedia.git $cd qtmultimedia/ $git checkout 5.15.2 $git submodule update --init --recursive $cd ../qt_build $qmake ../qtmultimedia/qtmultimedia.pro -- $make -j4 $make install
No error has come. I wrote
QT += core gui widgets xml multimedia
in .pro file and
#include <Qtmultimedia/QMediaPlayer>
into mainwindow.h file.
But IDE says "Qtmultimedia/QMediaPlayer not found" and "You need to set an executable in the custom run configuration".What am I missing?
-
After installation, you will be able to find this.
5.15.2/gcc_64/include/QtMultimedia
In the .pro file, add multimedia
QT += core gui widgets xml multimediaQT += core gui widgets xml multimedia
If I add
widgets xml
to QT +=, at #include<QMainWindwow> and some others, errors as "Lexical or preprocessor issue" and "Parse issue" happen...type:
locate QtMultimediaOkay, this is a result:
/opt/Webex/qml/QtMultimedia /opt/Webex/qml/QtMultimedia/libdeclarative_multimedia.so /opt/Webex/qml/QtMultimedia/qmldir /var/lib/flatpak/runtime/org.fedoraproject.Platform/x86_64/f34/ca7d2818b9f0f5fb411ff4ac4a7c6bf3e0b404aa3623d674b547245c0902f10a/files/lib64/qt5/qml/QtMultimedia /var/lib/flatpak/runtime/org.fedoraproject.Platform/x86_64/f34/ca7d2818b9f0f5fb411ff4ac4a7c6bf3e0b404aa3623d674b547245c0902f10a/files/lib64/qt5/qml/QtMultimedia/Video.qml /var/lib/flatpak/runtime/org.fedoraproject.Platform/x86_64/f34/ca7d2818b9f0f5fb411ff4ac4a7c6bf3e0b404aa3623d674b547245c0902f10a/files/lib64/qt5/qml/QtMultimedia/libdeclarative_multimedia.so /var/lib/flatpak/runtime/org.fedoraproject.Platform/x86_64/f34/ca7d2818b9f0f5fb411ff4ac4a7c6bf3e0b404aa3623d674b547245c0902f10a/files/lib64/qt5/qml/QtMultimedia/plugins.qmltypes /var/lib/flatpak/runtime/org.fedoraproject.Platform/x86_64/f34/ca7d2818b9f0f5fb411ff4ac4a7c6bf3e0b404aa3623d674b547245c0902f10a/files/lib64/qt5/qml/QtMultimedia/qmldir
When Qt is installed, there is an option to select multimedia for installation.
I used an installer which is from Open Source Qt Use but there was no option to multimedia. There, however, is an option to "Additional libraries->Qt->Active Qt, Qt 3D, Qt Charts and so forth" in Maintain Qt.