-1

So I need to use some macroses to integrate my c++ code with qml but I really dont know if I can use Q_PROPERTY or Q_INVOKE without derivering my class from QObject and without using Q_OBJECT macros.

Lacky RyDar
  • 61
  • 1
  • 7

1 Answers1

1

Yes, it is possible to put Q_PROPERTY in a struct, when also declaring it as a Q_GADGET, but without changed-signals. And according to Exposing Q_INVOKABLE in Q_GADGET to QML it also seems possible to put a Q_INVOKABLE on a Q_GADGET.

Amfasis
  • 3,932
  • 2
  • 18
  • 27