minimal QtWebEngine example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.0 | |
import QtWebEngine 1.0 | |
import QtQuick.Window 2.0 | |
WebEngineView { | |
width: Screen.width | |
height: Screen.height | |
url: 'http://duckduckgo.com' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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