Determination of properties to control the read-only mode
I'm a newbie in qt. And i started to read the book. In which i found out the following code.
Code:
Q_OBJECT
Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly)
private:
bool m_bReadOnly;
public:
, m_bReadOnly(false)
{
}
public:
void setReadOnly(bool bReadOnly)
{
m_bReadOnly = bReadOnly;
}
bool isReadOnly() const
{
return m_bReadOnly;
}
}
This code about "Determination of properties to control the read-only mode".
But i didn't understand it. And if someone know something about it. Plz,write down your answer. And where do i have to write this code in which file?
Re: Determination of properties to control the read-only mode
Maybe you should first explain what you don't understand?
Declaration of the property? Any part of the implementation for the property? Usage of the property?
Cheers,
_