近期学习Qt,记录下学习过程,以免忘记。操作环境 WIN7+Qt 5.12.0。
新建 Qt Quick Application - Empty 项目,命名 WebView 。
编辑 WebView.pro 文件,添加 webview 模块。
android{
QT += webview
}
切换到 Qt Creator 项目模式,构建设置:Build Android APK,展开详情,点击 Create Templates,创建 AndroidManifest.xml 文件。
在 Android 目录创建 assets/html/index.html 文件。编辑文件
index.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>WebView Demo