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

Extra meta object for c++ classes

    XMLWordPrintable

Details

    • d1d08a134d2b22b91150a70a1ec23f576bb38398 (pyside-setup/5.12. 23.10.2018, 5.12)

    Description

      Each Qt c++ type seems to have additional meta object. This makes at least one case difficult to do: If you want to know what methods a certain class defines on top of its subclass.

      For example, trying to figure out what QTimer provides on top of QObject is clumsy because QtCore.QObject is not actually inherited by QTimer. So generally (and in c++ api same would work) you would assume:

      QObject.staticMetaObject == QTimer.staticMetaObject.superClass()
      

      But because QTimer.staticMetaObject.superClass() actually returns the actual meta object of the actual QTimer here, not the QObject this inherits, this is false. And also QObject is wrapped, so this is the correct way:

      QObject.staticMetaObject.superClass() == QTimer.staticMetaObject.superClass().superClass()
      

      This is misleading at least.

      Attachments

        1. pyside784_activeqt_check.diff
          2 kB
        2. pyside784_log.txt
          3 kB
        3. pyside784_mo_builder.zip
          1 kB
        4. pyside784.py
          1 kB
        5. pyside784_mo_dumper.zip
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: