http://doc.qt.io/qt-5/qtqml-cppintegration-exposecppattributes.html
class Message : public QObject
{
Q_OBJECT
Q_PROPERTY(QString author READ author WRITE setAuthor NOTIFY authorChanged)
public:
void setAuthor(const QString &a) {
if (a != m_author) {
m_author = a;
emit authorChanged();
}
}
QString author() const {
return m_author;
}
signals:
void authorChanged();
private:
QString m_author;
};
他们已经写了emit authorChanged();
。
我想知道这个信号的插槽在哪里?
authorChanged()
发出信号时,哪些代码会发生变化?