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. how to restore windows taskbar thumbnail in PyQt5 if it was manipulate by vlc
Forum Updated to NodeBB v4.3 + New Features

how to restore windows taskbar thumbnail in PyQt5 if it was manipulate by vlc

Scheduled Pinned Locked Moved Unsolved Qt for Python
21 Posts 2 Posters 2.4k Views 2 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.
  • SGaistS SGaist

    Then I would check with VLC to see what is going on. You might found an unexpected behaviour.

    H Offline
    H Offline
    hacker6914
    wrote on last edited by hacker6914
    #7

    @SGaist Yes, go with my stackoverflow code .It will be easier for you.

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

      Sorry, what I meant by "I would check" is: if I was at your place, I would start by checking what the VLC folks are doing with the thumbnail.

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

      H 2 Replies Last reply
      0
      • SGaistS SGaist

        Sorry, what I meant by "I would check" is: if I was at your place, I would start by checking what the VLC folks are doing with the thumbnail.

        H Offline
        H Offline
        hacker6914
        wrote on last edited by hacker6914
        #9

        @SGaist I have already raised an issue at Python-VLC GitHubcheck here. they said it is neither Python-VlC nor VLC issue rather I need to ask Pyqt5/Qt. So I came here.If I can reinsert it then it will be a temporary fix for me. So I am asking..

        1 Reply Last reply
        0
        • SGaistS SGaist

          Sorry, what I meant by "I would check" is: if I was at your place, I would start by checking what the VLC folks are doing with the thumbnail.

          H Offline
          H Offline
          hacker6914
          wrote on last edited by
          #10

          @SGaist Is there any way?

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

            One thing you can check is if you have the same behaviour with PySide2.

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

            H 2 Replies Last reply
            0
            • SGaistS SGaist

              One thing you can check is if you have the same behaviour with PySide2.

              H Offline
              H Offline
              hacker6914
              wrote on last edited by hacker6914
              #12

              @SGaist I checked with PySide2,Same problem.I think VLC is somehow controlling thumbnail. So we need to reinsert it again.

              1 Reply Last reply
              0
              • SGaistS SGaist

                One thing you can check is if you have the same behaviour with PySide2.

                H Offline
                H Offline
                hacker6914
                wrote on last edited by hacker6914
                #13

                @SGaist I figured out something. When VLC started it forcely set the only video frame to the taskbar thumbnail where it is about to play/render on and when the player stops the taskbar show blank as it(the frame where video was played)does not contain anything after stopping the player . So here we have to do something with thumbnail so that it can cover the entire application.I figured out this by setting that frame background color. It is not actually blank, after hiding that frame anything present in the size range of that frame appears in the thumbnail
                .So Is there any way to fix that?

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

                  Can you post where you saw that ?

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

                  H 1 Reply Last reply
                  0
                  • H Offline
                    H Offline
                    hacker6914
                    wrote on last edited by
                    #15

                    @SGaist 1st image brfore playing
                    bandicam 2020-12-04 14-22-35-996.jpg
                    2nd image while playing
                    bandicam 2020-12-04 14-16-21-573.jpg
                    3rd image after stopping and hiding that frame
                    bandicam 2020-12-04 14-32-19-009.jpg

                    1 Reply Last reply
                    0
                    • SGaistS SGaist

                      Can you post where you saw that ?

                      H Offline
                      H Offline
                      hacker6914
                      wrote on last edited by hacker6914
                      #16

                      @SGaist As you can see in the 1st image, i set the window and videoframe background blue and yellow respectively.i Placed the red button in the size range of videoframe and both buttons are visible clearly in thumbnail( 1st image). and when video started playing it only show the videoframe in thumbnail as you can see in 2nd imagevideo with red button both but not that green button .In the third image you can see only the red button that's because vlc forcely set only that frame to the thumbnail .Any thing in the size range of that frame will be seen in thumbnail section.This is unexpected .
                      Let me know if you have not understood.

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

                        In your code you replace the showEvent implementation with setthumbnail but you do not call it anywhere else. So unless you trigger it again, it will have no effect.

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

                        H 1 Reply Last reply
                        0
                        • SGaistS SGaist

                          In your code you replace the showEvent implementation with setthumbnail but you do not call it anywhere else. So unless you trigger it again, it will have no effect.

                          H Offline
                          H Offline
                          hacker6914
                          wrote on last edited by hacker6914
                          #18

                          @SGaist Though I have not written in that code but I attempted several times in different different experiment for curiosity,but that has no effect.

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

                            Can you share the latest version of your tests ?

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

                            H 1 Reply Last reply
                            0
                            • SGaistS SGaist

                              Can you share the latest version of your tests ?

                              H Offline
                              H Offline
                              hacker6914
                              wrote on last edited by hacker6914
                              #20

                              @SGaist No, actually I moved on from that part and now I fixed the issue. As I said VLC set that frame into taskbar,and it can also be done using windows API ITaskbarList3::SetThumbnailCliphere and it will create no issue if someone design a media player application only but in my case I am just embedding that for some time.and if after stopping the player the thumbnail will be blank then it will be a problem for me.Finally I asked this issue how to use this API in the stack overflow but got no desired answer ,then I asked in the Discord Python Forums and One person helped me to fix that.You can see here.I think in PyQt5 Qt Windows Extras's QWinThumbnailToolBar Class should also have setThumbnailClip method like setIconicThumbnailPixmap() and others.

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

                                Thanks for the feedback !

                                If you would like to have something like that, you should open a feature request on the bug report system. PyQt will likely not provide APIs that are not part of Qt itself.

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

                                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