[solved] terminate application
-
@
QDeclarativeView *primaSchermata = new QDeclarativeView(this);
primaSchermata->setSource(QUrl::fromLocalFile("qml/OpenOrario/main.qml"));
primaSchermata->show();
QObject::connect(primaSchermata->engine(), SIGNAL(quit()), QCoreApplication::instance(), SLOT(quit()));
@this one does not start...
-
no, it is not.
@
QObject::connect(primaSchermata->engine(), SIGNAL(quit()), QCoreApplication::instance(), SLOT(quit()));
@
returns
@
..\OpenOrario\prima.cpp:28: error: no matching function for call to 'prima::connect(QDeclarativeEngine*, const char*, QCoreApplication*, const char*)'
c:\QtSDK\Desktop\Qt\4.7.3\mingw\include/QtCore/qobject.h:198: note: candidates are: static bool QObject::connect(const QObject*, const char*, const QObject*, const char*, Qt::ConnectionType)
c:\QtSDK\Desktop\Qt\4.7.3\mingw\include/QtCore/qobject.h:313: note: bool QObject::connect(const QObject*, const char*, const char*, Qt::ConnectionType) const
@if i delete the snippet and click on the button to close the app:
@
Rectangle { ... MouseArea { anchors.fill: parent; onClicked: Qt.quit() } }
@
there is this error:
@
Signal QDeclarativeEngine::quit() emitted, but no receivers connected to handle it.
@ -
[quote author="spode" date="1317308378"]no, it is not.[/quote]
I could not reproduce your problem. The snippet works whatsoever I try. In addition, the signature the compiler complains about matches one of the suggested signatures - which is rather strange.
However the problem has been solved for you.
To all the others: please someone enlighten me why this snippet might not work and how it can be forced to produce the error stated above.