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

Unable to subclass QPaintDeviceWindow

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P4: Low P4: Low
    • None
    • 6.x, 6.2.0, 5.15.15
    • PySide
    • None
    • All
    • 1a8923df9 (dev), 97b3ce600 (6.6)

      When trying to subclass QPaintDeviceWindow from python the application throws an exception when trying to instantiate the new subclass:

      TypeError: PySide6.QtGui.QWindow isn't a direct base class of <name-of-my-subclass>

      This is 100% reproducible by simply creating a new class that inherits from PySide6.QtGui.QPaintDeviceWindow even if the class has as little code as this:

      class CustomWindow(PySide6.QtGui.QPaintDeviceWindow):
        pass

      See the sample.pyfor a full code example.

      class Q_GUI_EXPORT QPaintDeviceWindow : public QWindow, public QPaintDevice
      

      similar to

      class Q_WIDGETS_EXPORT QWidget : public QObject, public QPaintDevice
      

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

            ctismer Christian Tismer
            rkoecher Rene Koecher
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes