qml-connections

QML Connections: Implicitly defined onFoo properties in Connections are deprecated

China☆狼群 提交于 2020-12-05 00:51:45
问题 I got the following error message when upgraded to Qt 5.15: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... } The corresponding QML code is pasted below Connections { target: AppProxy onLogsReady: function(logs) { textLogs.text = logs } } where the onLogsReady is a signal defined in the AppProxy class: class AppProxy : public QObject { Q_OBJECT Q_DISABLE_COPY(AppProxy) public: AppProxy(QObject*