Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt6 QPropertyAnimation: "This plugin does not support setting window opacity"

Qt6 QPropertyAnimation: "This plugin does not support setting window opacity"

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 580 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.
  • J Offline
    J Offline
    JonB
    wrote on 6 Sept 2024, 10:27 last edited by
    #1

    I answered a question here at https://forum.qt.io/topic/158580/animation-in-pyqt5. It creates a QPropertyAnimation to alter windowOpacity. The code works fine under my old Qt5 under Ubuntu 22.04.

    I tried exactly the same under my new Qt6 on Ubuntu 24.04. Under both PyQt6 and PySide6 it runs but every time Qt tries to change the opacity during the animation I see error message:

    This plugin does not support setting window opacity
    

    and opacity is not changed.

    The code does

    QPropertyAnimation(window, bytes('windowOpacity', 'utf8'))
    

    Although the code is Python I post in this General and Desktop forum as I presume it has nothing to do with Python/PyQt/PySide. If somebody really wants I could rewrite it in C++, but I'm thinking that is not necessary as the error comes from Qt6.

    The only similar question I came across Googling is on this forum years ago: https://forum.qt.io/topic/65342/this-plugin-does-not-support-setting-window-opacity. There @SGaist said

    You should give more details about the device and Qt backend you are using.

    and it was never resolved.

    I use the default wayland in GNOME desktop. I don't know whether that is relevant. I also allowed Ubuntu to install NVidia drivers, I don't know whether that is relevant either.

    Where/what component does the error message come from? What plugin are we even talking about? Should this work under Qt6?

    J 1 Reply Last reply 6 Sept 2024, 10:43
    0
    • V Offline
      V Offline
      VRonin
      wrote on 6 Sept 2024, 11:09 last edited by
      #4

      The answer is that it wasn't implemented. The private class QWaylandWindow does not overload the setOpacity method so the base class implementation is run and does nothing but display that message.

      The xcb implementation is here but there is no equivalent in wayland

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      2
      • J JonB
        6 Sept 2024, 10:27

        I answered a question here at https://forum.qt.io/topic/158580/animation-in-pyqt5. It creates a QPropertyAnimation to alter windowOpacity. The code works fine under my old Qt5 under Ubuntu 22.04.

        I tried exactly the same under my new Qt6 on Ubuntu 24.04. Under both PyQt6 and PySide6 it runs but every time Qt tries to change the opacity during the animation I see error message:

        This plugin does not support setting window opacity
        

        and opacity is not changed.

        The code does

        QPropertyAnimation(window, bytes('windowOpacity', 'utf8'))
        

        Although the code is Python I post in this General and Desktop forum as I presume it has nothing to do with Python/PyQt/PySide. If somebody really wants I could rewrite it in C++, but I'm thinking that is not necessary as the error comes from Qt6.

        The only similar question I came across Googling is on this forum years ago: https://forum.qt.io/topic/65342/this-plugin-does-not-support-setting-window-opacity. There @SGaist said

        You should give more details about the device and Qt backend you are using.

        and it was never resolved.

        I use the default wayland in GNOME desktop. I don't know whether that is relevant. I also allowed Ubuntu to install NVidia drivers, I don't know whether that is relevant either.

        Where/what component does the error message come from? What plugin are we even talking about? Should this work under Qt6?

        J Offline
        J Offline
        jsulm
        Lifetime Qt Champion
        wrote on 6 Sept 2024, 10:43 last edited by
        #2

        @JonB said in Qt6 QPropertyAnimation: "This plugin does not support setting window opacity":

        This plugin does not support setting window opacity

        What platform plug-in is used on your machine?

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

        J 1 Reply Last reply 6 Sept 2024, 10:56
        0
        • J jsulm
          6 Sept 2024, 10:43

          @JonB said in Qt6 QPropertyAnimation: "This plugin does not support setting window opacity":

          This plugin does not support setting window opacity

          What platform plug-in is used on your machine?

          J Offline
          J Offline
          JonB
          wrote on 6 Sept 2024, 10:56 last edited by
          #3

          @jsulm
          Thank you for replying! I don't know how to determine/prove which one I am using? I am pretty sure it is wayland or wayland-egl. How do I know? I don't seem to have any QT_QPA... environment variables.

          I just tested export QT_QPA_PLATFORM=xcb and confirm that does still work. So a wayland thing :( But on my old Ubuntu 22.04 + Qt5 it worked without my doing anything, that uses GNOME + wayland too.

          But on the old machine whenever I run a Qt program I have always received warning message

          Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
          

          I always wondered about that. Now in new system I do not get that message. Does that mean, for whatever reason, the old one (Ubuntu 22.04) persisted in using xcb even under wayland but the new one (Ubuntu 24.04) now really uses wayland, and that is where the difference lies?

          1 Reply Last reply
          0
          • V Offline
            V Offline
            VRonin
            wrote on 6 Sept 2024, 11:09 last edited by
            #4

            The answer is that it wasn't implemented. The private class QWaylandWindow does not overload the setOpacity method so the base class implementation is run and does nothing but display that message.

            The xcb implementation is here but there is no equivalent in wayland

            "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
            ~Napoleon Bonaparte

            On a crusade to banish setIndexWidget() from the holy land of Qt

            1 Reply Last reply
            2
            • J Offline
              J Offline
              JonB
              wrote on 6 Sept 2024, 11:16 last edited by
              #5

              @jsulm , @VRonin
              Thank you both. wayland seems to give nothing but limitations compared to xcb.

              Can either of you answer either of these two questions:

              • I don't understand what has changed running GNOME under Ubuntu 22.04 vs 24.04. Like I say above, under 22.04 it seems(?) it ignores wayland and executed my Qt programs using xcb anyway. Is that right? Do you know what has changed now such that I don't get that error message and it apparently really does run under wayland?

              • Could you tell me anyway how I can tell which QPA is being used when I have no QT_QPA... environment variables, please? I tried QT_DEBUG_PLUGINS=1 but from the diagnostics it talked about looking at/loading a whole load of available QPAs but I could not see a line which told me which one it actually decided to use?

              V 1 Reply Last reply 6 Sept 2024, 11:26
              0
              • J JonB
                6 Sept 2024, 11:16

                @jsulm , @VRonin
                Thank you both. wayland seems to give nothing but limitations compared to xcb.

                Can either of you answer either of these two questions:

                • I don't understand what has changed running GNOME under Ubuntu 22.04 vs 24.04. Like I say above, under 22.04 it seems(?) it ignores wayland and executed my Qt programs using xcb anyway. Is that right? Do you know what has changed now such that I don't get that error message and it apparently really does run under wayland?

                • Could you tell me anyway how I can tell which QPA is being used when I have no QT_QPA... environment variables, please? I tried QT_DEBUG_PLUGINS=1 but from the diagnostics it talked about looking at/loading a whole load of available QPAs but I could not see a line which told me which one it actually decided to use?

                V Offline
                V Offline
                VRonin
                wrote on 6 Sept 2024, 11:26 last edited by
                #6

                @JonB said in Qt6 QPropertyAnimation: "This plugin does not support setting window opacity":

                Could you tell me anyway how I can tell which QPA is being used

                Set the QT_LOGGING_RULES enviromental variable to qt.qpa.plugin=true (in Qt creator is it's under Project->Run->environment)

                "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                ~Napoleon Bonaparte

                On a crusade to banish setIndexWidget() from the holy land of Qt

                J 1 Reply Last reply 6 Sept 2024, 13:00
                0
                • V VRonin
                  6 Sept 2024, 11:26

                  @JonB said in Qt6 QPropertyAnimation: "This plugin does not support setting window opacity":

                  Could you tell me anyway how I can tell which QPA is being used

                  Set the QT_LOGGING_RULES enviromental variable to qt.qpa.plugin=true (in Qt creator is it's under Project->Run->environment)

                  J Offline
                  J Offline
                  JonB
                  wrote on 6 Sept 2024, 13:00 last edited by
                  #7

                  @VRonin
                  Perfect!

                  export QT_LOGGING_RULES=qt.qpa.plugin=true
                  
                  qt.qpa.plugin: init_platform called with pluginNamesWithArguments "wayland;xcb" platformPluginPath "" platformThemeName ""
                  qt.qpa.plugin: Attempting to load Qt platform plugin "wayland" with arguments QList()
                  qt.qpa.plugin: Successfully loaded Qt platform plugin "wayland"
                  
                  1 Reply Last reply
                  0
                  • J JonB has marked this topic as solved on 6 Sept 2024, 13:01

                  1/7

                  6 Sept 2024, 10:27

                  • Login

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