I have the following class hierarchy:Base (Q_OBJECT) -> IntermediateTemplate -> 
Derived (Q_OBJECT, not templated)The base class exposes some properties that 
are used by derived. Both the Base and the Derived are exposed to QML, but only 
Derived is creatable.The template exists to reduce boilerplate code and is not 
marked as Q_OBJECT. As such, it does not add any type information.The Derived 
class is not a template as it derives from an instance of the template.
When coding QML in Qt Creator, the properties defined in the Base class are 
marked invalid in the editor when accessed through the Derived class. At 
runtime, everything runs as expected, so it seems to be just a highlighting 
issue. Qt Creator seems unable to cross (or skip) the template class. When 
removing the intermediate template for the sake of testing the highlighting, Qt 
Creator is able to find the properties and no longer marks them invalid.
Is there a way around this issue? If not, wouldn't it be a good idea to let Qt 
Creator skip templated intermediate classes, as they can't add meta information 
anyway?                                    
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to