QObject::setProperty
QObject::setProperty("name", "liu");
QString name = QObject::property("name").toString();
通过Q_PROPERTY
Q_PROPERTY(bool focus READ hasFocus);
Q_PROPERTY(bool enabled READ isEnabled, WRITE setEnabled);
Q_PROPERTY(QCursor cursor READ cursor, WRITE setCursor RESET unsetCursor);