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
QtWS25 Last Chance

How to install module "QtMultimedia" on Windows

Scheduled Pinned Locked Moved Solved QML and Qt Quick
26 Posts 5 Posters 12.7k Views
  • 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 Offline
    Q Offline
    qcoderpro
    wrote on 22 Feb 2021, 08:57 last edited by
    #1

    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.

    J 1 Reply Last reply 22 Feb 2021, 09:03
    0
    • Q qcoderpro
      22 Feb 2021, 08:57

      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.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 22 Feb 2021, 09:03 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 22 Feb 2021, 09:07
      0
      • J jsulm
        22 Feb 2021, 09:03

        @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 22 Feb 2021, 09:07 last edited by
        #3

        @jsulm

        Qt 5.12.2 and using the online installer.

        J 1 Reply Last reply 22 Feb 2021, 09:09
        0
        • Q qcoderpro
          22 Feb 2021, 09:07

          @jsulm

          Qt 5.12.2 and using the online installer.

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 22 Feb 2021, 09:09 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 22 Feb 2021, 09:11
          0
          • J jsulm
            22 Feb 2021, 09:09

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

            Q Offline
            Q Offline
            qcoderpro
            wrote on 22 Feb 2021, 09:11 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.

            J 1 Reply Last reply 22 Feb 2021, 09:14
            0
            • Q qcoderpro
              22 Feb 2021, 09:11

              @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.

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 22 Feb 2021, 09:14 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 22 Feb 2021, 09:18
              0
              • J jsulm
                22 Feb 2021, 09:14

                @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 22 Feb 2021, 09:18 last edited by
                #7

                @jsulm
                Still exists

                Capture_3.PNG

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 22 Feb 2021, 19:33 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 22 Feb 2021, 21:05
                  0
                  • S SGaist
                    22 Feb 2021, 19:33

                    Hi,

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

                    Q Offline
                    Q Offline
                    qcoderpro
                    wrote on 22 Feb 2021, 21:05 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
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 22 Feb 2021, 22:20 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 23 Feb 2021, 03:18
                      0
                      • S SGaist
                        22 Feb 2021, 22:20

                        Did you re-run qmake after adding that line ?

                        Q Offline
                        Q Offline
                        qcoderpro
                        wrote on 23 Feb 2021, 03:18 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 J 2 Replies Last reply 23 Feb 2021, 04:27
                        0
                        • Q qcoderpro
                          23 Feb 2021, 03:18

                          @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 23 Feb 2021, 04:27 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
                            23 Feb 2021, 03:18

                            @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?

                            J Offline
                            J Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on 23 Feb 2021, 06:22 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 23 Feb 2021, 06:42 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 J 2 Replies Last reply 23 Feb 2021, 06:48
                              0
                              • Q qcoderpro
                                23 Feb 2021, 06:42

                                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 23 Feb 2021, 06:48 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 23 Feb 2021, 07:07
                                2
                                • eyllanescE eyllanesc
                                  23 Feb 2021, 06:48

                                  @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 23 Feb 2021, 07:07 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 23 Feb 2021, 07:08
                                  0
                                  • Q qcoderpro
                                    23 Feb 2021, 07:07

                                    @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 23 Feb 2021, 07:08 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
                                      23 Feb 2021, 06:42

                                      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

                                      J Offline
                                      J Offline
                                      jsulm
                                      Lifetime Qt Champion
                                      wrote on 23 Feb 2021, 07:14 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 23 Feb 2021, 07:24
                                      1
                                      • J jsulm
                                        23 Feb 2021, 07:14

                                        @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 23 Feb 2021, 07:24 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?

                                        J 1 Reply Last reply 23 Feb 2021, 07:26
                                        0
                                        • Q qcoderpro
                                          23 Feb 2021, 07:24

                                          @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?

                                          J Offline
                                          J Offline
                                          jsulm
                                          Lifetime Qt Champion
                                          wrote on 23 Feb 2021, 07:26 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

                                          1/26

                                          22 Feb 2021, 08:57

                                          • Login

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