C++ (Qt)void TestList::FillList(){ const int num = 1000; for( int i = 0; i < num; i++ ) notebook.append( new NoteEntry("person_"+QString::number(i), qrand()%60+20, i%2) ); rootContext()->setContextProperty("DeathList",QVariant::fromValue(notebook)); setSource(QUrl("qrc:/main.qml")); if( ! rootContext()->isValid() ) { qWarning()<<"QML is not valid"; QApplication::quit(); } resize(300, 300);}