提交 28e09eef 编写于 作者: mahuifa's avatar mahuifa

docs:修改web.md

上级 bbc6c745
......@@ -33,10 +33,16 @@ VERSION = 1.0.0
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
contains(QT_ARCH, i386){ # 使用32位编译器
DESTDIR = $$PWD/../bin # 程序输出路径
path = $$PWD/../bin # 程序输出路径
}else{
DESTDIR = $$PWD/../bin64 # 使用64位编译器
path = $$PWD/../bin64 # 使用64位编译器
}
DESTDIR = $$path # 指定编译后的文件存放路径
# 程序编译后需要使用nmake installmsvc)或make install (linux)web文件夹拷贝到当前路径下,或者自己手动拷贝
webFile.path = $$path
webFile.files = $$PWD/video.html
INSTALLS += webFile # web文件夹拷贝到path路径下,需要配置Custom Process Step: nmake install才生效
# msvc 编译器使用utf-8编码
msvc {
......
......@@ -43,12 +43,9 @@ path = $$PWD/../bin64 # 使用64位编译器
DESTDIR = $$path # 指定编译后的文件存放路径
# 程序编译后需要使用nmake installmsvc)或make install (linux)web文件夹拷贝到当前路径下,或者自己手动拷贝
exists ($$PWD/web) { # 判断文件夹是否存在
webFile.path = $$path
webFile.files = $$PWD/web
INSTALLS += webFile # web文件夹拷贝到path路径下,需要配置Custom Process Step: nmake install才生效
}
webFile.path = $$path
webFile.files = $$PWD/web
INSTALLS += webFile # web文件夹拷贝到path路径下,需要配置Custom Process Step: nmake install才生效
# msvc 编译器使用utf-8编码
msvc {
......
......@@ -6,9 +6,11 @@
## 1、说明
| 类名 | 功能 |
| :-----------: | ------------------------------------------------------------ |
| minimal | 使用QWebEngineView加载显示Web页面的最小示例1 |
| 类名 | 功能 |
| :-----------: | -------------------------------------------- |
| minimal | 使用QWebEngineView加载显示Web页面的最小示例1 |
| minimal2 | 使用QWebEngineView加载显示Web页面的最小示例2 |
| authorization | 使用QWebEnginePage打开摄像头演示权限管理 |
......@@ -31,3 +33,30 @@
> 3. 详细的注释,对初学者更友好。
![image-20221211210252527](Web.assets/image-20221211210252527.png)
### 1.2 minimal2
> 1. 使用QWebEngineView加载显示Web页面的最小示例2
> 2. 保留最简单功能,去掉不易于理解的功能;
> 3. 分别演示了【QWebEngineView::setHtml】【QWebEngineView::setContent】的使用方法;
> 4. 详细的注释,对初学者更友好。
* setHtml加载html代码
![image-20221214171041497](Web.assets/image-20221214171041497.png)
* setHtml加载html代码,并通过相对路径引用参数2的地址中的图片
![image-20221214171147965](Web.assets/image-20221214171147965.png)
### 1.3 authorization
> 1. 使用QWebEnginePage有时需要权限,例如打开摄像头、麦克风;
> 2. 这里演示了怎么实现授权功能;
> 3. 分别展示了打开【网络地址授权】和打开【本地html授权】。
![image-20221215174224272](Web.assets/image-20221215174224272.png)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册