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

pydoc shows wrong parameter types for setImage and setPixmap in QClipboard

    XMLWordPrintable

Details

    • 12ba61a24 (dev), 9510c3345 (6.5)

    Description

      Both setImage and setPixmap show str, but neither actually accepts it with PySide6.

      setPixmap additionally says it can take QImage, but it doesn't take that either.

      >>> app = QGuiApplication([])
      >>> clipboard = app.clipboard()
      >>> clipboard.setPixmap(QImage("logo.png"))
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
      ValueError: 'PySide6.QtGui.QClipboard.setPixmap' called with wrong argument values:
        PySide6.QtGui.QClipboard.setPixmap(<PySide6.QtGui.QImage(QSize(450, 305),format=QImage::Format_Indexed8,depth=8,colorCount=66,devicePixelRatio=1,bytesPerLine=452,sizeInBytes=137860) at 0x7f71dda52440>,)
      Found signature:
        PySide6.QtGui.QClipboard.setPixmap(Union[PySide6.QtGui.QPixmap, PySide6.QtGui.QImage, str], PySide6.QtGui.QClipboard.Mode = Instance(PySide6.QtGui.QClipboard.Mode.Clipboard))
      

      Attachments

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

        Activity

          People

            kleint Friedemann Kleint
            poikelin Joni Poikelin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes