Created
January 12, 2015 08:53
-
-
Save Tosainu/8d4bd1e28813d3f93d4e to your computer and use it in GitHub Desktop.
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 <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(); | |
} |
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
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