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

TypeError with grabWindow first argument (expecting quintptr instead of int)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • None
    • 5.11.0
    • PySide
    • None

    Description

      I didn't see a ticket for this specific issue. Also, I didn't see the Qt version where I am experiencing this bug in Versions field. (used the oldest one)

      I have tried various ways of getting this to work but I haven't been able to get the grabWindow method in PySide2 to work as expected.
      Am I missing something here? And please let me know if you need any more information.

      >>> PySide2._version_
      '2.0.0~alpha0'

      >>> PySide2.QtCore._version_
      '5.6.1'

      >>> from PySide2 import QtWidgets, QtGui
      >>> screen = QtWidgets.QApplication.instance().primaryScreen()
      >>> screen
      <PySide2.QtGui.QScreen object at 0x7f43e6b60ef0>
      
      >>> screen.grabWindow(0)
      Traceback (most recent call last):
        File "<console>", line 1, in <module>
      TypeError: 'PySide2.QtGui.QScreen.grabWindow' called with wrong argument types:
        PySide2.QtGui.QScreen.grabWindow(int)
      Supported signatures:
        PySide2.QtGui.QScreen.grabWindow(quintptr, int = 0, int = 0, int = -1, int = -1)
      
      >>> geometry = screen.geometry()
      
      >>> screen.grabWindow(0, geometry.x(), geometry.y(), geometry.width(), geometry.height())
      Traceback (most recent call last):
        File "<console>", line 1, in <module>
      TypeError: 'PySide2.QtGui.QScreen.grabWindow' called with wrong argument types:
        PySide2.QtGui.QScreen.grabWindow(int, int, int, int, int)
      Supported signatures:
        PySide2.QtGui.QScreen.grabWindow(quintptr, int = 0, int = 0, int = -1, int = -1)
      
      
      >>> screen.grabWindow(QtWidgets.QApplication.instance().desktop().winId(), geometry.x(), geometry.y(), geometry.width(), geometry.height())
      Traceback (most recent call last):
        File "<console>", line 1, in <module>
      TypeError: 'PySide2.QtGui.QScreen.grabWindow' called with wrong argument types:
        PySide2.QtGui.QScreen.grabWindow(int, int, int, int, int)
      Supported signatures:
        PySide2.QtGui.QScreen.grabWindow(quintptr, int = 0, int = 0, int = -1, int = -1) 

      Attachments

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

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            vimj1905 Vimanyu Jain
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes