Q_PROPERTY NOTIFY uses
General and Desktop
3
Posts
2
Posters
1.0k
Views
1
Watching
-
Hi, I'm currently trying to use notify to call a function within the same class as opposed to sending a signal to a slot and having to use connect. Is this possible?
I need to constantly check for hp changes and would prefer to do it using this method to catch all the exceptions.
-
i think you misunderstood the usage of NOTIFY in Q_PROPERTY macros?
NOTIFY just specifies the name of the signal which is emitted whenever the value changes.
You need to take care to emit the signal in your setter method.And also you need to do the connection of this signal to your custom slot yourself.