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

Moc does not natively support Q_OBJECT in template specialization

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • 6.9
    • 6.6.2
    • Build tools: moc
    • None
    • Windows

    Description

      If you try to add Q_OBJECT and Q_SIGNAL in a template specialization class, MOC does not generate meta code and silently fails.

      QObject meta code symbols will be not found by the compiler.

      A workaround is to define a type for the template specialization (with using or typedef) and to replace the class declaration with the explicit type only with the macro Q_MOC_RUN.

      Attachments

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

        Activity

          People

            fabiankosmale Fabian Kosmale
            theod Théo Devaucoup
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes