[Development] qdoc for C++ and QML

Robin Burchell robin.burchell at crimson.no
Tue Apr 25 11:46:58 CEST 2017


On Mon, Apr 24, 2017, at 05:08 PM, Shawn Rutledge wrote:
> > And if a C++ class has a corresponding QML type, should every member function be included in the documentation for both? How will qdoc know that a member function only applies to the C++ class or only to the QML type?
> 
> Q_INVOKABLE for methods should cover it, I think, if qdoc already knows
> that the class is exposed to QML.  Plus properties, of course.  Usually a
> property setter is not invokable, but there can be exceptions.

This will involve some amount of work, though: for instance, qdoc would
need to be taught what to do with QQmlListProperty<T>
("list<SomeOtherT>" in output, e.g. QQmlListProperty<QObject> ->
list<Object>).

There's also registered types are not necessarily intended to be
user-creatable, for instance, Item::layer, QQuickPen (Rectangle's border
type) which need to be handled "specially" in documentation.

And the good old subject of "variant" functions like Item::mapFromItem,
which will need special casing...

-- 
  Robin Burchell
  robin at crimson.no



More information about the Development mailing list