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

QPixmap.save raises and error when called with a QBuffer device

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4: Low
    • 6.3
    • 6.3.0
    • PySide
    • None
    • PySide6 6.3.0
      shiboken6 6.3.0
      Python 3.10
      Manjaro Linux

    Description

      from PySide6.QtGui import QGuiApplication, QPixmap
      from PySide6.QtCore import QBuffer
      
      app = QGuiApplication([])
      pm = QPixmap(100, 100)
      b = QBuffer()
      pm.save(b, b'png')
      
      

      raises an

      Traceback (most recent call last):
        File "scripy.py", line 7, in <module>
          pm.save(b, b'png')
      ValueError: 'PySide6.QtGui.QPixmap.save' called with wrong argument values:
        PySide6.QtGui.QPixmap.save(<PySide6.QtCore.QBuffer(0x564b90818ef0) at 0x564b90819190>, b'png')
      Found signature:
        PySide6.QtGui.QPixmap.save(PySide6.QtCore.QIODevice, Union[bytes, NoneType] = None, int = -1)
      

      Note that QBuffer is a QIODevice.

      The same error is also raised in PySide2

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            shpremna Shyamnath Premnadh
            aleserjavec Ales Erjavec
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes