Hi!

My situation:

Trying to code a calendar with QML, so I am using Repeater { ... } that will display days in selected month. As a model for Repeater I'm using a list with instances of class, that represent data for every day:

Qt Code:
  1. context->setContextProperty("_days_list", QVariant::fromValue(daysList));
To copy to clipboard, switch view to plain text mode 

For simplicity in class that represents data for days I have properties:

Qt Code:
  1. Q_PROPERTY( int dayNum READ getDayNum WRITE setDayNum NOTIFY dayNumChanged)
  2. Q_PROPERTY( QQmlListProperty<CalEvent> getDayEvents READ getDayEvents CONSTANT)
To copy to clipboard, switch view to plain text mode 

I have no problem displaying "dayNum"

Qt Code:
  1. Repeater {
  2. model: _days_list
  3. Rectangle {
  4. id: dayRectangle
  5. width: 25
  6. height: 25
  7. Text {
  8. id: daysText
  9. text: model.modelData.dayNum
  10. anchors.centerIn: parent
  11. }
  12. }
  13. }
To copy to clipboard, switch view to plain text mode 

But there is my problem: how can I access QQmlListProperty<CalEvent> with events for each day? For example after double click on Rectangle that represents one tile in calendar's grid I want to open a Window, that will show names of all day's events.

If i do this:
Qt Code:
  1. onDoubleClicked: {
  2. var component = Qt.createComponent("eventDialog.qml");
  3. eventWin = component.createObject(mainWindow);
  4. console.log(model.modelData.getDayEvents)
  5. eventWin.show();
  6. }
To copy to clipboard, switch view to plain text mode 

I get output into console: "qml: [object Object]", but don't know how to access e.g first event of the day.

In advance: thanks for help.

P.S: my source codes for calendar are on github: here