Answer the question
In order to leave comments, you need to log in
How to compile Qt WebEngine?
Project content
.pro file
TEMPLATE = app
QT += webengine
QT += qml quick
CONFIG += c++11
SOURCES += main.cpp
RESOURCES += qml.qrc
CONFIG+=release
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QtWebEngine>
int main(int argc, char **argv) {
QGuiApplication app(argc, argv);
QtWebEngine::initialize();
QQmlApplicationEngine appEngine;
appEngine.load(QUrl("qrc:/main.qml"));
return app.exec();
}
import QtQuick 2.1
import QtQuick.Controls 1.1
import QtWebEngine 1.1
ApplicationWindow {
width: 680
height: 520
visible: true
title: qsTr("Hello World")
WebEngineView {
visible: true
id: webview
url: "http://www.qt.io"
anchors.fill: parent
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question