Create a gist now

Instantly share code, notes, and snippets.

@penk /main.cpp
Last active Sep 13, 2016

What would you like to do?
minimal QtWebEngine example
#include <QtGui/QGuiApplication>
#include <QtQml/QQmlApplicationEngine>
#include <QtWebEngine/qtwebengineglobal.h>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QtWebEngine::initialize();
QQmlApplicationEngine appEngine;
appEngine.load(QUrl("main.qml"));
return app.exec();
}
import QtQuick 2.0
import QtWebEngine 1.0
import QtQuick.Window 2.0
WebEngineView {
width: Screen.width
height: Screen.height
url: 'http://duckduckgo.com'
}
TARGET = browser
TEMPLATE = app
SOURCES = main.cpp
QT += qml quick webengine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment