QWebEngineView_CssVariables
1、测试代码,参考网址:http://blog.sina.com.cn/s/blog_1508519340102wgq0.html
2、测试下来,结果:
2.1、Qt5.6开始,没有 WebKit了...
至 Qt5.5.1(vs2013)为止,WebKit 都不支持 "CSS Variable"
2.2、Qt5.6.1-1 WebEngine不支持 "CSS Variable"
2.3、Qt5.7.0(vs2013) WebEngine支持 "CSS Variable"
Qt5.7.0 是目前能下载到的 最新版本(20160909)。
3、(20160909)看网上说,WebEngine 只能是 QtVS的版本能用,gcc版本的Qt不能使用WebEngine,∵需要用到 MS的一些头文件
4、我的简单使用WebEngine的代码:(Qt Widgets Application)
4.1、pro文件
#-------------------------------------------------
#
# Project created by QtCreator 2016-09-09T23:01:54
#
#------------------------------------------------- QT += core gui \
webenginewidgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = qt570_test
TEMPLATE = app SOURCES += main.cpp\
mainwindow.cpp HEADERS += mainwindow.h FORMS += mainwindow.ui
4.2、mainwindow.h
#ifndef MAINWINDOW_H
#define MAINWINDOW_H #include <QMainWindow>
#include <QtWebEngineWidgets/QtWebEngineWidgets> namespace Ui {
class MainWindow;
} class MainWindow : public QMainWindow
{
Q_OBJECT public:
explicit MainWindow(QWidget *parent = );
~MainWindow(); protected:
void resizeEvent(QResizeEvent *); private:
Ui::MainWindow *ui;
QWebEngineView *pwe;
}; #endif // MAINWINDOW_H
4.3、mainwindow.cpp
#include "mainwindow.h"
#include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this); pwe = new QWebEngineView(this);
pwe->load(QUrl::fromUserInput("file:///F:/ZC_PT/20160826/html5/CssVar_Test.html"));
pwe->show();
} MainWindow::~MainWindow()
{
delete ui;
} void MainWindow::resizeEvent(QResizeEvent *)
{
pwe->resize(this->size());
}
4.4、其他文件内容 都是默认
5、
QWebEngineView_CssVariables的更多相关文章
随机推荐
- jfinal关联查询给dto添加表结构以外的字段并返回的处理方式
官网栗子: http://www.jfinal.com/doc/5-10 5.10 表关联操作 JFinal ActiveRecord 天然支持表关联操作,并不需要学习新的东西,此为无招胜有招.表关联 ...
- Git源码安装
系统自带yum安装的git版本较老,需要安装最新版本可以使用源码安装 下载最新安装包,下载地址https://github.com/git/git/releases 安装依赖包 yum install ...
- ZOJ 3210 A Stack or A Queue?
A Stack or A Queue? Time Limit: 1 Second Memory Limit: 32768 KB Do you know stack and queue? Th ...
- 徐州网络赛H-Ryuji doesn't want to study【线段树】
Ryuji is not a good student, and he doesn't want to study. But there are n books he should learn, ea ...
- AngularJs:Directive指令用法
摘自:http://www.jb51.net/article/83051.htm 摘要:Directive(指令)是AngularJ非常强大而有有用的功能之一.它就相当于为我们写了公共的自定义DOM元 ...
- linux软件源配置
实操(虚拟机安装): 下载VMware,然后按照如下教程安装虚拟机: https://jingyan.baidu.com/article/c275f6ba07e269e33d756714.html ...
- 【云安全与同态加密_调研分析(8)】同态加密技术及其应用分析——By Me
◆同态加密技术(Homomorphic Encryption, HE)及其应用◆ ◆加密方案◆ ◆应用领域◆ ◆厂商◆ ◆同态加密现有产品形态和工程实现◆ ◆参考链接◆ ◆备注(其他参考信息)◆ 同态 ...
- centos shell编程4【分发系统】 服务器标准化 mkpasswd 生成密码的工具 expect讲解 expect传递参数 expect自动同步文件 expect指定host和要同步的文件 expect文件分发系统 expect自动发送密钥脚本 Linux脚本执行方式 第三十八节课
centos shell编程4[分发系统] 服务器标准化 mkpasswd 生成密码的工具 expect讲解 expect传递参数 expect自动同步文件 expect指定host和要 ...
- 需求:过滤下面这个网页里共723行 校对中里 行数为两位数的 行 并设置sz和rz在Windows和Linux之间发送和接收文件不用搭FTP
需求:过滤下面这个网页里共723行 校对中里 行数为两位数的 行 并设置sz和rz在Windows和Linux之间发送和接收文件不用搭FTP 需求:过滤下面这个网页里共723行 校对中里 行数为两位数 ...
- nodejs通过代理(proxy)发送http请求(request)
有可能有这样的需求,需要node作为web服务器通过另外一台http/https代理服务器发http或者https请求,废话不多说直接上代码大家都懂的: var http = require('htt ...