[ fromfile: reflection-questions.xml id: reflection-questions ]
What kinds of information can you obtain from a QMetaObject?
What Qt classes are used to do data reflection? Explain why.
How does the QMetaObject code for each of your QObject-derived classes get generated?
What is a downcast? In what situations do you use them?
What is RTTI? How does Qt provide RTTI?
Discuss the differences between the dynamic_cast
and qobject_cast
operators.
What is a QVariant? How might you make use of one?
What are the advantages of using property()
and setProperty()
over direct getters and setters?
What does the property()
function return? How do you obtain the actual stored value?
Explain how it is possible to add new properties, acquired at runtime, to a QObject.
Explain how dynamic properties can be serialized.
Generated: 2012-03-02 | © 2012 Alan Ezust and Paul Ezust. |