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

QMetaObject inherits does not work as documented

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated 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

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes