-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
22 lines (17 loc) · 724 Bytes
/
Copy pathmain.cpp
File metadata and controls
22 lines (17 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <QtGui/QApplication>
#include "qmlapplicationviewer.h"
#include "carddavclient.h"
#include <QtDeclarative/QDeclarativeContext>
#include <QUrl>
Q_DECL_EXPORT int main(int argc, char *argv[])
{
QScopedPointer<QApplication> app(createApplication(argc, argv));
QmlApplicationViewer viewer;
// TODO This is another URL apart from accountURL in JavaScript!!
viewer.rootContext()->setContextProperty("cardDavClient",
new CardDavClient(QUrl("https://google.com/.well-known/carddav"), &viewer));
// new CardDavClient(QUrl("https://www.google.com/calendar/dav"), &viewer));
viewer.setMainQmlFile(QLatin1String("qml/Cards/main.qml"));
viewer.showExpanded();
return app->exec();
}