In this case you just have to use the proper method:Qt Code:
void assignProp() { der_no = number(); }To copy to clipboard, switch view to plain text mode
In this case you just have to use the proper method:Qt Code:
void assignProp() { der_no = number(); }To copy to clipboard, switch view to plain text mode
Hi jacek,
Thanks for quick reply,
Thats right i can use method but then what is use of Q_PROPERTY? means i am missing some knowledge regarding Q_PROPERTY. I think that because of Q_PROPERTY macro one sholud not get the knowledge of class members and do get set of property defined in a class.
Can you briefly give what is the exact use of Q_PROPERTY.
Thanks,
Mitesh..
You can use QObject::property() and QObject::setProperty() to change the value of given property without knowing anything about the object.Originally Posted by mitesh_modi
http://www.qtcentre.org/forum/f-newb...erty-1596.html
Bookmarks