Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. 怎么播放音频(QT6.5.2)

怎么播放音频(QT6.5.2)

Scheduled Pinned Locked Moved Unsolved Qt 6
8 Posts 3 Posters 698 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.
  • V Offline
    V Offline
    vstar
    wrote on last edited by
    #1

    我搞了一个音乐mp3,然后我想点击时播放,但是点击并不会出声音
    9707d48a-bd3f-44a7-b4bb-03a33f2e0508-image.png

    Christian EhrlicherC 1 Reply Last reply
    0
    • V vstar

      我搞了一个音乐mp3,然后我想点击时播放,但是点击并不会出声音
      9707d48a-bd3f-44a7-b4bb-03a33f2e0508-image.png

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Please write your question in english or use the appropriate subforum.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      V 1 Reply Last reply
      0
      • Christian EhrlicherC Christian Ehrlicher

        Please write your question in english or use the appropriate subforum.

        V Offline
        V Offline
        vstar
        wrote on last edited by
        #3

        @Christian-Ehrlicher I made a music mp3, and then I wanted to play it when I clicked, but the click didn't make a sound

        Christian EhrlicherC 1 Reply Last reply
        0
        • V vstar

          @Christian-Ehrlicher I made a music mp3, and then I wanted to play it when I clicked, but the click didn't make a sound

          Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Basic c++ - how long does QMediaPlayer live? QMediaPlayer::player() does not block.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          V 1 Reply Last reply
          0
          • Christian EhrlicherC Christian Ehrlicher

            Basic c++ - how long does QMediaPlayer live? QMediaPlayer::player() does not block.

            V Offline
            V Offline
            vstar
            wrote on last edited by
            #5

            @Christian-Ehrlicher emm.My English is not good.

            JoeCFDJ 1 Reply Last reply
            0
            • V vstar

              @Christian-Ehrlicher emm.My English is not good.

              JoeCFDJ Offline
              JoeCFDJ Offline
              JoeCFD
              wrote on last edited by JoeCFD
              #6

              @vstar QMediaPlayer ms is deleted after on_pushButton_13_clicked function call is finished. How can you play? Make ms a member in the class MainWindow.

              Christian EhrlicherC 1 Reply Last reply
              0
              • JoeCFDJ JoeCFD

                @vstar QMediaPlayer ms is deleted after on_pushButton_13_clicked function call is finished. How can you play? Make ms a member in the class MainWindow.

                Christian EhrlicherC Offline
                Christian EhrlicherC Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @JoeCFD said in 怎么播放音频(QT6.5.2):

                Make ms a global variable.

                global? Member please!

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                JoeCFDJ 1 Reply Last reply
                0
                • Christian EhrlicherC Christian Ehrlicher

                  @JoeCFD said in 怎么播放音频(QT6.5.2):

                  Make ms a global variable.

                  global? Member please!

                  JoeCFDJ Offline
                  JoeCFDJ Offline
                  JoeCFD
                  wrote on last edited by JoeCFD
                  #8

                  @Christian-Ehrlicher Right. Changed it.

                  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