Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Could not update timestamps for skipped samples.
QtWS25 Last Chance

Could not update timestamps for skipped samples.

Scheduled Pinned Locked Moved Unsolved Qt for Python
7 Posts 2 Posters 652 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.
  • L Offline
    L Offline
    LuoMeng
    wrote on 18 Mar 2025, 09:24 last edited by
    #1

    When I use QMediaPlayer() and QAudioOutput() modules to play mp3, I got this warning, why this one happen? The test code is like below:

    from PyQt6.QtWidgets import QApplication, QWidget, QLabel, QMenu, QAction
    from PyQt6.QtGui import QPixmap
    from PyQt6.QtCore import QUrl
    from PyQt6.QtMultimedia import QMediaPlayer, QAudioOutput
    
    class DesktopPet(QWidget):
        def __init__(self):
            super().__init__()
    
            self.label = QLabel(self)
            self.pixmap = QPixmap("pet.png") 
            self.label.setPixmap(self.pixmap)
            self.label.resize(self.pixmap.size()) 
    
            self.media_player = QMediaPlayer(self)
            self.audio_output = QAudioOutput(self)
            self.media_player.setAudioOutput(self.audio_output)
            self.media_player.setSource(QUrl.fromLocalFile("music.mp3"))  
    
            self.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu)
            self.customContextMenuRequested.connect(self.show_context_menu)
    
        def show_context_menu(self, pos):
            menu = QMenu(self)
    
            play_music_action = QAction("Play sound", self)
            play_music_action.triggered.connect(self.play_music)
            menu.addAction(play_music_action)
    
            menu.exec(self.mapToGlobal(pos))
    
        def play_music(self):
            if self.media_player.isPlaying():
                self.media_player.pause()
            else:
                self.media_player.play()
    
    if __name__ == "__main__":
        app = QApplication(sys.argv)
        pet = DesktopPet()
        pet.show()
        sys.exit(app.exec())
    

    How to forbid this?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 18 Mar 2025, 20:36 last edited by
      #2

      Hi,

      This stack overflow answer has a well explained answer.

      Currently I don't think you can do anything from the user side.

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

      L 1 Reply Last reply 19 Mar 2025, 08:56
      0
      • S SGaist
        18 Mar 2025, 20:36

        Hi,

        This stack overflow answer has a well explained answer.

        Currently I don't think you can do anything from the user side.

        L Offline
        L Offline
        LuoMeng
        wrote on 19 Mar 2025, 08:56 last edited by
        #3

        @SGaist Ok, thx, actually I found this one before. But I think even the warning stuff, we should fix it. For programming world, it is only zero and one, right? Hope this could be fixed soon.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 19 Mar 2025, 11:57 last edited by
          #4

          Hope won't help without a bug report.
          You should check the bug report system to see if there's something related and if not open a ticket about this issue.

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

          L 1 Reply Last reply 20 Mar 2025, 02:58
          0
          • S SGaist
            19 Mar 2025, 11:57

            Hope won't help without a bug report.
            You should check the bug report system to see if there's something related and if not open a ticket about this issue.

            L Offline
            L Offline
            LuoMeng
            wrote on 20 Mar 2025, 02:58 last edited by
            #5

            @SGaist You are right, bro, but I am quite new in this field and I am not a programming actually. So this will to tough for me to deal with. Maybe in the future when I become an expert.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 20 Mar 2025, 07:40 last edited by
              #6

              You don't need to be an expert :-)
              You can simply go to the bug reporting system and check there if there's already something about it.

              If not, open a new ticket providing your example and full system information so it is easier to reproduce. Provide the findings you made about the error message and how it can be dealt with.

              If a report already exist, you can check whether it contains all the information required. If not, add yours. You can also vote for it.

              That would already be a good help to improve Qt.

              You are not required to implement a solution, but if you want to take a shot at it, then just try. It's one way to learn and get better at the subject.

              We all started and tried at some point, that's also how you learn :-)

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

              L 1 Reply Last reply 10 Apr 2025, 09:36
              0
              • S SGaist
                20 Mar 2025, 07:40

                You don't need to be an expert :-)
                You can simply go to the bug reporting system and check there if there's already something about it.

                If not, open a new ticket providing your example and full system information so it is easier to reproduce. Provide the findings you made about the error message and how it can be dealt with.

                If a report already exist, you can check whether it contains all the information required. If not, add yours. You can also vote for it.

                That would already be a good help to improve Qt.

                You are not required to implement a solution, but if you want to take a shot at it, then just try. It's one way to learn and get better at the subject.

                We all started and tried at some point, that's also how you learn :-)

                L Offline
                L Offline
                LuoMeng
                wrote on 10 Apr 2025, 09:36 last edited by
                #7

                @SGaist I get it, thx, I will try.

                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