Wait, in the examples in the doc (http://doc.trolltech.com/latest/prop...simple-example), the member is given in the Q_PROPERTY line and never again.
It later defines the enum type Priority, but doesn't create a member priority.Qt Code:
Q_PROPERTY(Priority priority READ priority WRITE setPriority)To copy to clipboard, switch view to plain text mode
So, as I understand, the macro already creates the data member.
As well, should I uncomment the original data members (which are commented in the given header), it compiles just fine, as stated in the OP. However, the signal is not emitted. Even if the value is altered via the WRITE function.
I mean, I'm not supposed to manually emit() the signal from within the WRITE function, right? That's precisely what the NOTIFY keyword is supposed to do for me, right?
EDIT: Just read this, which cleared my doubt regarding the variable declaration, but there's still the issue of the signal not being emitted.
Bookmarks