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

Unable to subclass QPaintDeviceWindow

    XMLWordPrintable

Details

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

    Description

      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
      

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes