Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法禁用给定 QObject 实例的所有属性的写访问器,有效地将它们变成无操作?
阿法克:不。
Q_PROPERTY宏在编译时触发构建moc方法,因此您无法在运行时更改特定 QObject 派生实例的行为。
Q_PROPERTY
moc