Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.
It is possible to write a non-GUI QtQuick application. The use cases for that are if you want to create a console based application (a la http://upload.wikimedia.org/wikipedia/commons/c/c5/Fdedit.png ), or simply if you wish to construct non-visual QObjects in a structured way (think about it as CSV on steroids). Here's an example for your main.cpp
int main(int argc, char *argv)
QCoreApplication app(argc, argv);
QDeclarativeContext *context = new QDeclarativeContext(engine.rootContext());
QDeclarativeComponent component(&engine, QLatin1String("main.qml"));
QObject *window = component.create(context);
and then a main.qml that would look like
import Qt 4.7
Component.onCompleted: console.log("Hello world");
You cannot render the standard graphical elements (Rectangle, Text, etc), so in the case of a curses UI you would have to implement your own textual widgets, but non-visual elements (like Timers) are usable as-is:
import Qt 4.7
interval: 500; running: true; repeat: true;
Note that some Elements in QtQuick actually depend on some aspects of the GUI which might not be apparent. In the example above, we needed to switch QtObject with Item because Timer wants to synchronize with animations, something not provided by QtObject, only visual items like Item.