For a NOTIFY signal on a property, what's the difference if I give it a parameter?

Suppose I have a class that looks like this:

class Something : QObject {
  Q_PROPERTY(int something READ getSomething NOTIFY somethingChanged)

  // ...

  signals:
    void somethingChanged();
}

According to the documentation, announcements somethingChangedlike void somethingChanged(), and void somethingChanged(int)(pay attention to the option) are valid. Why do I want to do this one by one?

+1
source share
1 answer

, . ++ API, , . , QObject::sender(), , , .

QML , , - , , , , . , .

. , , , QML. , - , , QML.

+2

Source: https://habr.com/ru/post/1676021/


All Articles