
#include <QtGui/QApplication>
#include <QtDeclarative>
#include <QDir>

#include "mywebview.h"

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

    qmlRegisterType<MyWebView>("custom", 1, 0,
                                          "MyWebView");

    QDeclarativeView view;
    view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
    view.setAutoFillBackground(false);
    view.setGeometry(QApplication::desktop()->screenGeometry());

    QDeclarativeEngine *engine = view.engine();
    QObject::connect(engine, SIGNAL(quit()), &app, SLOT(quit()));

    view.setSource(QUrl::fromLocalFile("qml/Main.qml"));
    view.showFullScreen();

    return app.exec();
}
