Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-72395

QMetaObject inherits does not work as documented

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.12.0
    • None
    • Qt 5.12.0
      MSVC2017 64bit

      Windows 10x64

      QtCreator 4.8.0
      Based on Qt 5.12.0 (MSVC 2015, 32 bit)
      Built on Dec 3 2018 13:08:01
      From revision d51ddbb8f0
    • Windows

    Description

      While QMetaObject::inherits works when passing QMetaObject::superClass, it does not work when passing a QObject::staticMetaObject of the base class. I've provided a very basic example below, and with just one level of inheritance it does not work.

      Attachments

        1. main.cpp
          1 kB
        2. main.qml
          0.1 kB
        3. QMetaObjectTest.pro
          1 kB
        4. qml.qrc
          0.1 kB
        5. TestClass.cpp
          0.4 kB
        6. TestClass.h
          0.4 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ogoffart Olivier Goffart (Woboq GmbH)
            dchamberlain David Chamberlain
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes