Not exactly "return_value = QML_Modal_Dialog(....)", but you can emit a signal from your QML file and execute a c++ slot to continue your c++ processing.
Something like this:
C++:
Code:
void yourClass::loadQml(){
QString file = "qml/Yes/something.qml";
QDeclarativeView *qmlView = new QDeclarativeView(this);
qmlView->setSource(QUrl::fromLocalFile(file));
QVBoxLayout *layout = new QVBoxLayout(this);
layout->addWidget(qmlView);
qmlView->setFocus();
QObject* listView = qmlView->rootObject()->findChild<QObject *>("listView");
connect(listView,SIGNAL(accepted()),this,SLOT(accepted()));
connect(listView,SIGNAL(cancelled()),this,SLOT(cancelled()));}
QML:
Code:
ListView {
id: MyListView
objectName: "listView"
...
signal accepted
signal cancelled
}
...
...
...
MouseArea {
anchors.fill: parent
...
onClicked: {
// emit the signal
MyListView.accepted(); }
}
...
MouseArea {
anchors.fill: parent
...
onClicked: {
// emit the signal
MyListView.cancelled(); }
}