Skip to content

Instantly share code, notes, and snippets.

@Tosainu
Created January 12, 2015 08:53
Show Gist options
  • Save Tosainu/8d4bd1e28813d3f93d4e to your computer and use it in GitHub Desktop.
Save Tosainu/8d4bd1e28813d3f93d4e to your computer and use it in GitHub Desktop.
#include <QApplication>
#include <QtWebKitWidgets>
auto main(int argc, char **argv) -> int {
QApplication app(argc, argv);
auto webview = new QWebView();
webview->setHtml(R"(
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"></head>
<body>
<h1>Hello World!</h1>
</body>
</html>
)");
webview->show();
return app.exec();
}
QT += core gui webkitwidgets
TEMPLATE = app
TARGET = QWebView_example
INCLUDEPATH += .
SOURCES += main.cc
CONFIG += c++11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment