On Thu, Oct 11, 2012 at 12:07 AM, Chris Meyer <cmeyer1969...@gmail.com> wrote: > The Qt property system easily represents properties (scalars) and > to-one relationships (objects) using the Q_PROPERTY macro. > > However, what is the best way to represent to-many relationships? > > For instance, I can represent have an Employee and define a property > for the employee's name (scalar string) and his company (object). But > if I define a Company, how to I provide access to the company's > employees (list of objects)? > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest
Q_PROPERTY(QList<Employee*> employees READ employees...) no? maybe I didn't understand your question... Aleix _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest