I'm new to Qt and came upon the Q_PROPERTY class, and was trying to set a static member using it. This is what I have so far:
class test{
Q_OBJECT
Q_PROPERTY(bool enabled READ enabled WRITE setEnabled)
public:
bool enabled() const{
return m_enabled;
}
void setEnabled(bool enable){
m_enabled = enable;
}
private:
static bool m_enabled;
};
I'm getting compile errors when I try to run this so I'm not sure if there is a way to use static members with Q_PROPERTY. I've read through their documentation and other forum responses but I'm still unclear on the purpose of using Q_PROPERTY.