{
QmlApplicationViewer *viewer(QmlApplicationViewer::create());
QDeclarativeContext *rootCtxt = viewer->rootContext();
QObject *QMLObject = viewer->rootObject();
viewer->setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
viewer->setSource(QUrl("qrc:/meego/harmattan/qml/mainwindow.qml"));
viewer->showExpanded();
titleListModel->setTitleIterator(TitleIterator());
Evopedia *evopedia = (static_cast<EvopediaApplication *>(qApp))->evopedia();
foreach (LocalArchive *b, evopedia->getArchiveManager()->getDefaultLocalArchives())
ui->languageChooser->addItem(b->getLanguage());
/// change ui to QML
// ui->listView->setModel(titleListModel);
QObject* QMLtitlesView = QMLObject->findChild<QObject*>("titlesView");
QDeclarativeContext *titlesCtxt=rootCtxt->findChild<QDeclarativeContext*>("titlesView");
//SEGFAULT HERE:
titlesCtxt->setContextProperty("titlesModel", titleListModel);