QT5.12 WebEngine 简单使用

本文介绍了在QT 5.15.2环境下,使用MSVC 2015编译器配置并使用WebEngine的简单步骤。首先通过QT Creator创建工程,接着在工程Pro文件中添加必要的库依赖如QT += core gui webenginewidgets webengine。完成配置后,执行qmake使依赖生效。然后在main.cpp中编写代码打开网页,最终成功运行并显示网页内容。
摘要由CSDN通过智能技术生成

QT5.12 WebEngine 简单使用

本地环境 msvc 2015 + Qt 5.15.2 + WebEngine

1、通过QT Creator 创建工程
在这里插入图片描述
2、配置WebEngine相关

  • 工程Pro文件增加这两个相关库依赖 QT += core gui webenginewidgets webengine 。需要注意的是,这里增加了lib依赖后。需要针对工程执行qmake,这样才会把依赖引用进来(右键工程,会出现执行qmake选项)。在这里插入图片描述

  • 更改main.cpp 尝试打开网页
    在这里插入图片描述

  • 运行结果
    在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
\SOFTWARE The main directory from the root where all software-related files are placed. \SOFTWARE\BLOCKS The main directory where all ‘Building Blocks’ are located. With μC/OS-II, I included a ‘building block’ that handles DOS-type compatible functions that are used by the example code. \SOFTWARE\BLOCKS\TO This directory contains the files for the TO utility (see Appendix E, TO). The source file is TO.C and is found in the \SOFTWARE\TO\SOURCE directory. The DOS executable file (TO.EXE) is found in the \SOFTWARE\TO\EXE directory. Note that TO requires a file called TO.TBL which must reside on your root directory. An example of TO.TBL is also found in the \SOFTWARE\TO\EXE directory. You will need to move TO.TBL to the root directory if you are to use TO.EXE. \SOFTWARE\uCOS-II The main directory where all μC/OS-II files are located. \SOFTWARE\uCOS-II\EX1_x86L This directory contains the source code for EXAMPLE #1 (see section 1.07, Example #1) which is intended to run under DOS (or a DOS window under Windows 95). \SOFTWARE\uCOS-II\EX2_x86L This directory contains the source code for EXAMPLE #2 (see section 1.08, Example #2) which is intended to run under DOS (or a DOS window under Windows 95). \SOFTWARE\uCOS-II\EX3_x86L This directory contains the source code for EXAMPLE #3 (see section 1.09, Example #3) which is intended to run under DOS (or a DOS window under Windows 95). \SOFTWARE\uCOS-II\Ix86L This directory contains the source code for the processor dependent code (a.k.a. the port) of μC/OS-II for an 80x86 Real-Mode, Large Model processor. \SOFTWARE\uCOS-II\SOURCE This directory contains the source code for processor independent portion of μC/OS-II. This code is fully portable to other processor architectures.
Qt 5.15和Qt 5.12之间有一些重要的区别。以下是一些主要的区别: 1. 新功能和改进:每个Qt版本都会引入新的功能和改进,以提供更好的开发体验和性能优化。Qt 5.15相对于Qt 5.12引入了许多新功能,比如Qt Quick 3D、QtWebEngine更新、QtCharts的改进、Qt Virtual Keyboard的增强等。具体的改进取决于你使用的模块和功能。 2. 维护和支持:Qt版本通常会得到一段时间的维护和支持。Qt 5.15是一个长期支持(LTS)版本,意味着它会得到长时间的支持和更新,包括错误修复和安全补丁。而Qt 5.12则是一个先前的LTS版本,也会有限度地得到维护和支持。 3. 兼容性:新版本可能引入了一些不兼容的改变。如果你的项目是基于Qt 5.12构建的,升级到Qt 5.15可能需要进行一些代码调整和测试,以确保兼容性。 4. 性能优化:每个新版本都可能会带来一些性能优化,如更快的启动时间、更高效的资源管理等。因此,Qt 5.15可能在性能方面有一些改进,但具体效果取决于你的具体使用情况。 综上所述,Qt 5.15相对于Qt 5.12引入了许多新功能和改进,并提供了长期支持。但升级到新版本可能需要考虑兼容性和适配工作。如果你的项目已经在Qt 5.12上运行良好,并且没有迫切需要新功能或长期支持的要求,那么继续使用Qt 5.12也是可以的。否则,可以考虑升级到Qt 5.15以获得最新的功能和支持。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值