summaryrefslogtreecommitdiffstats
path: root/examples/undo/editor/main.cpp
blob: ea27ba10b47aae21688c1698cd4ecc2fcb8aa9eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <QtCore/QUrl>
#include <QtGui/QGuiApplication>
#include <QtQuick/QQuickView>
#include <QtQml/QQmlContext>
#include <UiHelpers/uihelpersglobal.h>
#include <UiHelpers/UiUndoStack>

#include "stack.h"

QT_USE_NAMESPACE_UIHELPERS;

int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    QQuickView v;

    Stack stack;
    v.rootContext()->setContextProperty("stack", &stack);

    v.setSource(QUrl::fromLocalFile("main.qml"));

    v.show();

    return app.exec();
}