Skip to content

Instantly share code, notes, and snippets.

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

Embed
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
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.