Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-801

QPropertyAnimation requires QByteArray instead of a regular str for its propertyName

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.11.0
    • Fix Version/s: None
    • Component/s: Documentation, PySide
    • Labels:
      None
    • Environment:
      Linux (Ubuntu 14.04, x64)
      Python 3.6.2, x64
      PySide2 5.11.1 (official release through pip)
    • Platform/s:
      Linux/X11

      Description

      PySide2.QtCore.QPropertyAnimation requires the propertyName to be a byte type instead of the usual str. Easily fixable, but don't know if it was reported yet (or intended).

       

      So:

      >> QPropertyAnimation(foo, "windowOpacity")

      TypeError: 'PySide2.QtCore.QPropertyAnimation' called with wrong argument types:
        PySide2.QtCore.QPropertyAnimation(PySide2.QtCore.QObject, str)
      Supported signatures:
        PySide2.QtCore.QPropertyAnimation(PySide2.QtCore.QObject = nullptr)
        PySide2.QtCore.QPropertyAnimation(PySide2.QtCore.QObject, PySide2.QtCore.QByteArray, PySide2.QtCore.QObject = nullptr)

       

      But:

      >> QPropertyAnimation(foo, b"windowOpacity")

      Works fine.

        Attachments

        For Gerrit Dashboard: PYSIDE-801
        # Subject Branch Project Status CR V

          Activity

            People

            • Assignee:
              crmaurei Cristian Maureira-Fredes
              Reporter:
              ttphan Tung Phan
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes