Uploaded image for project: 'Qt Visual Studio Tools'
  1. Qt Visual Studio Tools
  2. QTVSADDINBUG-1315

moc does not recognize Q_INTERFACES(...) class

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Not Evaluated Not Evaluated
    • None
    • 3.3.1.1, 3.4.0
    • None
    • Win11 with MSVC 2022 version 17.13.7
    • Windows

      I am using QT 5.15.13 with MSVC 2022.
      Prior to version 3.3.1.1 of QTVSADDIN this code snippet was accepted in moc:

      #include <QtGlobal>
      #include <QtUiPlugin/QDesignerCustomWidgetInterface>

      class SplitCanvas : public QObject
                        , public QDesignerCustomWidgetInterface

      {     Q_OBJECT     Q_PLUGIN_METADATA(IID "SplitCanvas" FILE "FahrtauswertungsPlugInQt.json")     Q_INTERFACES(QDesignerCustomWidgetInterface) // <---- error points to here ... }

      Now I am getting:
      1>moc ...\FahrtauswertungsPlugInQt.h
      1> D:...\FahrtauswertungsPlugInQt.h(21): Error: Undefined interface
      1>C:\...\QtMsBuild\qt_work.targets(138,5): error MSB4181: The "QtRunWork" task returned false but did not log an error.

      see also https://bugreports.qt.io/browse/QTVSADDINBUG-1283

      Another issue was that the version QTVSADDIN 3.4.0 was reported as 3.3.1.1 inside MSVC Extension Manager, which led to some confusion as well.

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

            mecfc Miguel Costa
            hexcoder Heiko Eissfeldt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes