动态属性

obj->setProperty("isGirl", true) // 动态添加属性,为obj增添一个属性,并赋值true
qDebug() << obj->property("isGirl").toBool(); // 获取动态属性

标签: none

添加新评论