Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to install module "QtMultimedia" on Windows
Forum Updated to NodeBB v4.3 + New Features

How to install module "QtMultimedia" on Windows

Scheduled Pinned Locked Moved Solved QML and Qt Quick
26 Posts 5 Posters 13.4k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q qcoderpro

    When I run a QML project on my Windows machine, I get the errors below on Qt Creator:
    qrc:/main.qml:4:1: module "QtMultimedia" is not installed
    qrc:/main.qml:5:1: module "QtQuick.Dialogs" is not installed

    How to install those two modules? I look them up on the web but couldn't find a handy resource on how to that.

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #2

    @qcoderpro said in How to install module "QtMultimedia" on Windows:

    How to install those two modules?

    How did you install Qt and which version?

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    Q 1 Reply Last reply
    0
    • jsulmJ jsulm

      @qcoderpro said in How to install module "QtMultimedia" on Windows:

      How to install those two modules?

      How did you install Qt and which version?

      Q Offline
      Q Offline
      qcoderpro
      wrote on last edited by
      #3

      @jsulm

      Qt 5.12.2 and using the online installer.

      jsulmJ 1 Reply Last reply
      0
      • Q qcoderpro

        @jsulm

        Qt 5.12.2 and using the online installer.

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #4

        @qcoderpro Can you show how you're importing these modules?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        Q 1 Reply Last reply
        0
        • jsulmJ jsulm

          @qcoderpro Can you show how you're importing these modules?

          Q Offline
          Q Offline
          qcoderpro
          wrote on last edited by
          #5

          @jsulm

          import QtQuick 2.12
          import QtQuick.Window 2.12
          import QtQuick.Controls 2.5
          import QtMultimedia 5.15
          import QtQuick.Dialogs 1.5
          import QtQuick.LocalStorage 2.12
          

          Lines 4 and 5 have read lines beneath them.

          jsulmJ 1 Reply Last reply
          0
          • Q qcoderpro

            @jsulm

            import QtQuick 2.12
            import QtQuick.Window 2.12
            import QtQuick.Controls 2.5
            import QtMultimedia 5.15
            import QtQuick.Dialogs 1.5
            import QtQuick.LocalStorage 2.12
            

            Lines 4 and 5 have read lines beneath them.

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #6

            @qcoderpro said in How to install module "QtMultimedia" on Windows:

            import QtMultimedia 5.15

            I think it should be 5.12 as you're using Qt 5.12 not 5.15

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            Q 1 Reply Last reply
            0
            • jsulmJ jsulm

              @qcoderpro said in How to install module "QtMultimedia" on Windows:

              import QtMultimedia 5.15

              I think it should be 5.12 as you're using Qt 5.12 not 5.15

              Q Offline
              Q Offline
              qcoderpro
              wrote on last edited by
              #7

              @jsulm
              Still exists

              Capture_3.PNG

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #8

                Hi,

                Did you add QT += multimedia to your .pro file ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                Q 1 Reply Last reply
                0
                • SGaistS SGaist

                  Hi,

                  Did you add QT += multimedia to your .pro file ?

                  Q Offline
                  Q Offline
                  qcoderpro
                  wrote on last edited by
                  #9

                  @SGaist

                  I get the error below after adding that line in the .pro file:
                  :-1: error: Project ERROR: Unknown module(s) in QT: multimedia

                  And this is the .pro file contents:

                  QT += quick
                  CONFIG += c++11
                  QT += multimedia
                  
                  # The following define makes your compiler emit warnings if you use
                  # any Qt feature that has been marked deprecated (the exact warnings
                  # depend on your compiler). Refer to the documentation for the
                  # deprecated API to know how to port your code away from it.
                  DEFINES += QT_DEPRECATED_WARNINGS
                  
                  # You can also make your code fail to compile if it uses deprecated APIs.
                  # In order to do so, uncomment the following line.
                  # You can also select to disable deprecated APIs only up to a certain version of Qt.
                  #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
                  
                  SOURCES += \
                          main.cpp
                  
                  RESOURCES += qml.qrc
                  
                  # Additional import path used to resolve QML modules in Qt Creator's code model
                  QML_IMPORT_PATH =
                  
                  # Additional import path used to resolve QML modules just for Qt Quick Designer
                  QML_DESIGNER_IMPORT_PATH =
                  
                  # Default rules for deployment.
                  qnx: target.path = /tmp/$${TARGET}/bin
                  else: unix:!android: target.path = /opt/$${TARGET}/bin
                  !isEmpty(target.path): INSTALLS += target
                  
                  DISTFILES += \
                      android/AndroidManifest.xml \
                      android/build.gradle \
                      android/gradle/wrapper/gradle-wrapper.jar \
                      android/gradle/wrapper/gradle-wrapper.properties \
                      android/gradlew \
                      android/gradlew.bat \
                      android/res/values/libs.xml
                  
                  contains(ANDROID_TARGET_ARCH,armeabi-v7a) {
                      ANDROID_PACKAGE_SOURCE_DIR = \
                          $$PWD/android
                  }
                  
                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #10

                    Did you re-run qmake after adding that line ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    Q 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      Did you re-run qmake after adding that line ?

                      Q Offline
                      Q Offline
                      qcoderpro
                      wrote on last edited by qcoderpro
                      #11

                      @SGaist

                      Yes, I did it but no change in the outcome! :(

                      I thought of making a new project with the same title and files this time using the CMake build system.

                      Capture.PNG

                      I've not used CMake yet. Should I add the QT += multimedia line in the CMakeLists.txt file and retest the project after re-running CMake?

                      eyllanescE jsulmJ 2 Replies Last reply
                      0
                      • Q qcoderpro

                        @SGaist

                        Yes, I did it but no change in the outcome! :(

                        I thought of making a new project with the same title and files this time using the CMake build system.

                        Capture.PNG

                        I've not used CMake yet. Should I add the QT += multimedia line in the CMakeLists.txt file and retest the project after re-running CMake?

                        eyllanescE Offline
                        eyllanescE Offline
                        eyllanesc
                        wrote on last edited by
                        #12

                        @qcoderpro Are you sure you are using Qt5? I suspect you are using Qt6

                        If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

                        1 Reply Last reply
                        0
                        • Q qcoderpro

                          @SGaist

                          Yes, I did it but no change in the outcome! :(

                          I thought of making a new project with the same title and files this time using the CMake build system.

                          Capture.PNG

                          I've not used CMake yet. Should I add the QT += multimedia line in the CMakeLists.txt file and retest the project after re-running CMake?

                          jsulmJ Offline
                          jsulmJ Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on last edited by
                          #13

                          @qcoderpro Do you have more than one Kit? If so do you use the one where Qt has multimedia module?

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0
                          • Q Offline
                            Q Offline
                            qcoderpro
                            wrote on last edited by
                            #14

                            I've configurated only the Desktop kit as follows. Also, the Help menu says I'm using 5.15 while the kit is 6! I don't know which one is more correct! :|

                            1.PNG

                            2.PNG

                            eyllanescE jsulmJ 2 Replies Last reply
                            0
                            • Q qcoderpro

                              I've configurated only the Desktop kit as follows. Also, the Help menu says I'm using 5.15 while the kit is 6! I don't know which one is more correct! :|

                              1.PNG

                              2.PNG

                              eyllanescE Offline
                              eyllanescE Offline
                              eyllanesc
                              wrote on last edited by eyllanesc
                              #15

                              @qcoderpro As I suspected, you are confusing the version with which QtCreator was compiled (5.15.2) with the Qt you have installed (Qt 6.0.0). If you analyze the second image you will see that "C:/Qt/6.0.0/mingw81_64/lib/..." says where it is concluded that you are using Qt 6.0.0. Solution: Download Qt5 and remove Qt6 so you don't have that kind of problem

                              If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

                              Q 1 Reply Last reply
                              2
                              • eyllanescE eyllanesc

                                @qcoderpro As I suspected, you are confusing the version with which QtCreator was compiled (5.15.2) with the Qt you have installed (Qt 6.0.0). If you analyze the second image you will see that "C:/Qt/6.0.0/mingw81_64/lib/..." says where it is concluded that you are using Qt 6.0.0. Solution: Download Qt5 and remove Qt6 so you don't have that kind of problem

                                Q Offline
                                Q Offline
                                qcoderpro
                                wrote on last edited by
                                #16

                                @eyllanesc

                                the version with which QtCreator was compiled (5.15.2) with the Qt you have installed (Qt 6.0.0).

                                Can't we have Qt 6 for both the compiled and installed versions to get rid of this problem and also have the most up-to-date Qt version?

                                Download Qt5 and remove Qt6 so you don't have that kind of problem

                                You mean to unselect Qt 6.0.0 and select Qt 5.15.2?
                                So what are those Qt 6.0.0 and Qt 6.0.1 for?

                                1.PNG

                                eyllanescE 1 Reply Last reply
                                0
                                • Q qcoderpro

                                  @eyllanesc

                                  the version with which QtCreator was compiled (5.15.2) with the Qt you have installed (Qt 6.0.0).

                                  Can't we have Qt 6 for both the compiled and installed versions to get rid of this problem and also have the most up-to-date Qt version?

                                  Download Qt5 and remove Qt6 so you don't have that kind of problem

                                  You mean to unselect Qt 6.0.0 and select Qt 5.15.2?
                                  So what are those Qt 6.0.0 and Qt 6.0.1 for?

                                  1.PNG

                                  eyllanescE Offline
                                  eyllanescE Offline
                                  eyllanesc
                                  wrote on last edited by eyllanesc
                                  #17

                                  @qcoderpro I recommend you select 5.15.2 and deselect Qt 6.0.0.

                                  Qt 6.x.y is a new version (with many internal changes) but so far the multimedia module has not been added. See this https://stackoverflow.com/questions/65213872/qt6-and-multimedia-module.

                                  If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

                                  1 Reply Last reply
                                  2
                                  • Q qcoderpro

                                    I've configurated only the Desktop kit as follows. Also, the Help menu says I'm using 5.15 while the kit is 6! I don't know which one is more correct! :|

                                    1.PNG

                                    2.PNG

                                    jsulmJ Offline
                                    jsulmJ Offline
                                    jsulm
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #18

                                    @qcoderpro said in How to install module "QtMultimedia" on Windows:

                                    Help menu says I'm using 5.15 while the kit is 6!

                                    No, it says what Qt version was used to build QtCreator, not what Qt you're using.

                                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                                    Q 1 Reply Last reply
                                    1
                                    • jsulmJ jsulm

                                      @qcoderpro said in How to install module "QtMultimedia" on Windows:

                                      Help menu says I'm using 5.15 while the kit is 6!

                                      No, it says what Qt version was used to build QtCreator, not what Qt you're using.

                                      Q Offline
                                      Q Offline
                                      qcoderpro
                                      wrote on last edited by
                                      #19

                                      @eyllanesc
                                      Thanks.

                                      @jsulm

                                      No, it says what Qt version was used to build QtCreator, not what Qt you're using.

                                      So is the proper way to see the Qt version installed to look at the version of the kits' Qt, please?

                                      jsulmJ 1 Reply Last reply
                                      0
                                      • Q qcoderpro

                                        @eyllanesc
                                        Thanks.

                                        @jsulm

                                        No, it says what Qt version was used to build QtCreator, not what Qt you're using.

                                        So is the proper way to see the Qt version installed to look at the version of the kits' Qt, please?

                                        jsulmJ Offline
                                        jsulmJ Offline
                                        jsulm
                                        Lifetime Qt Champion
                                        wrote on last edited by
                                        #20

                                        @qcoderpro said in How to install module "QtMultimedia" on Windows:

                                        So is the proper way to see the Qt version installed to look at the version of the kits' Qt, please?

                                        Yes

                                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                                        1 Reply Last reply
                                        1
                                        • Q Offline
                                          Q Offline
                                          qcoderpro
                                          wrote on last edited by
                                          #21

                                          One more question.
                                          Should we update Qt to the latest version (Qt6 or 6.1) to be able to use QtQuick3D? If so, how to use libraries like QtMultimedia which are not supported in those up-to-date versions yet? :(

                                          JKSHJ 1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved