#include #include #include #include #include #include #include "date.h" #include int main(int argc, char *argv[]) { QSurfaceFormat fmt; fmt.setVersion(3, 1); fmt.setDepthBufferSize(24); QSurfaceFormat::setDefaultFormat(fmt); qmlRegisterType("DateParser", 1, 0, "DateParser"); qDebug() << "Device supports OpenSSL: " << QSslSocket::supportsSsl(); // Qt Charts uses Qt Graphics View Framework for drawing, therefore QApplication must be used. QApplication app(argc, argv); QQuickView viewer; // The following are needed to make examples run without having to install the module // in desktop environments. #ifdef Q_OS_WIN QString extraImportPath(QStringLiteral("%1/../../../../%2")); #else QString extraImportPath(QStringLiteral("%1/../../../%2")); #endif viewer.engine()->addImportPath(extraImportPath.arg(QGuiApplication::applicationDirPath(), QString::fromLatin1("qml"))); QObject::connect(viewer.engine(), &QQmlEngine::quit, &viewer, &QWindow::close); viewer.setTitle(QStringLiteral("QML Chart")); viewer.setSource(QUrl("qrc:/solar-android/main.qml")); viewer.setResizeMode(QQuickView::SizeRootObjectToView); viewer.show(); return app.exec(); }