linux下qt环境的运行,在Linux下使用QT环境来安装和运行WebKit

Installing and Running WebKit in Linux Using Qt

I’m

coming to appreciate more and more all of the hard work software

developers perform. I wouldn’t consider myself an open source elitist,

but there’s something special about the associated ideologies. When a

large community of people band together to work on a project, a lot of

fantastic products can be created.

One such product is WebKit, the open source Web browser rendering engine used by Safari

(as well as a number of other products). It’s very important to keep in

mind that Safari and WebKit are two very different things. Safari is a

Web browser that uses WebKit as it’s rendering engine.

The WebKit developers put forth the effort to port WebKit to Qt, which is, as stated by the developers:

Qt

is a comprehensive development framework that includes an extensive

array of features, capabilities and tools that enable development of

high-performance, cross-platform rich-client and server-side

applications.

Qt is truly cross-platform and allows deployment on a wide range of

hardware configurations, as opposed to other “cross-platform” products

that are restricted to Windows and Mac OS X. The fact that the WebKit developers put forth the effort of porting to Qt4

gives users the ability to run their rendering engine on any platform.

Thanks to their hard work, it’s quite easy to run a WebKit-based

browser in Linux.

Preparing your Linux system for WebKit

I’d like to be explicit in saying that the following instructions are geared towards a fresh install of Ubuntu 7.04, but should be applicable to a wide variety of Linux distributions. First and foremost you’ll need to add extra repositories. After you have followed those steps we can begin.

There are a number of packages you’ll need to successfully build a Qt4 Web browser that uses WebKit.

sudo apt-get install libqt4-dev libxslt-dev gperf bison libsqlite3-dev flex build-essential subversion

There will be a lot of additional packages to install, so don’t be

surprised if the list of packages for installation is significantly

large.

Obtaining a nightly build of WebKit

Next, we’ll need to use Subversion to check out the WebKit source. The following command will check out files to a folder titled WebKit within your working directory, so be sure your working directory is appropriate (I used my home directory).

svn checkout http://svn.webkit.org/repository/webkit/trunk WebKit

You will be able to monitor the checkout process as each file is listed in your terminal.

21e0359e4df962e36142a6d76b33f5e7.png

The checkout will take some time, as there are quite a few files to

download. When the checkout is complete, you’ll see the following

message:

d12e098da9c31185bd032395ca59509c.png

Building your Qt4 WebKit browser

When the checkout is complete, you can initiate the build of your Qt4 WebKit browser using the following command:

QTDIR=/usr/share/qt4/ WebKit/WebKitTools/Scripts/build-webkit

The script will take a minute to prepare the build, and then the process will begin.

ddc50dada27214c5fd168c35e3beab3f.png

This step can take quite a bit of time depending on your hardware

configuration, so take a few minutes to have a cup of coffee and relax

while your browser is being built. Your terminal will scroll with

hundreds of lines of build commands and more, so don’t feel the need to

sit and watch it build (unless you’re interested — I was).

e29b63788f8a998939d53cf9f517310e.png

When your build is complete, you’ll see the following message:

0833aa62cc5fcaf088a5737a1c432bca.png

Running the browser

A successful build means you can run your Qt4 WebKit browser using the following command:

WebKit/WebKitBuild/Release/WebKitQt/QtLauncher/QtLauncher about:blank

A very basic browser window will appear with limited controls and an

address bar. There will be some information scrolling in your terminal,

but it can generally be disregarded.

719f77288b9b2123f80485419bf9bf9a.png

You’ve now got a native WebKit browser to play around with in Linux.

I took a second to attach the launch command to an entry in an panel

using the WebKit icon. It’s more convenient than keeping the command

saved somewhere to copy and paste when I’d like to test in WebKit.

3712d88f226a4b5eb2736dd0c5cc2a20.png

You can also add your WebKit browser as an entry in your Applications menu using the menu editor if you prefer.

Some quirks I’ve come across so far

There are a few things that will appear out of place. First and

foremost, you’ll notice that form inputs will have, what seem to be, a

random background-color. I may be completely mistaken,

but I haven’t looked into things deep enough to find the rhyme or

reason behind the discrepancy. From what I can tell, if the input is styled with CSS, the style takes precedence over any ‘default’ colorization.

The next issue I’ve come across is that you’re not able to work with xHttpRequest.

This is another issue I have not researched in enough detail, but if

anyone has any insight regarding an inability to make use of XHR, I’d be interested in reading about it.

Finally, the only other quirk I’ve come across so far is that you’ll need to include http:// in any URL

you enter in the address bar. While this may seem like a small detail

to write about, after my first successful build I spent a few minutes

thinking that something went wrong.

Things to keep in mind

Perhaps the most important thing to keep in mind is that you’re

running a nightly build of WebKit, not the build Safari is using. The

nightly versions are much more advanced than Safari’s WebKit, so some

of the quirks that appear in Safari may be handled in your Qt4 browser.

Due to the version discrepancy, you can’t depend on a nightly build

of WebKit sufficing for a legitimate test in Safari. It is useful,

however, to take a quick look at overall structural elements of your

designs before making the effort of moving to an OS X machine.

Footnotes and inspiration

I was originally drawn to working with WebKit on Linux by a post on the same subject at as days pass by. I had followed his instructions and ran into a few issues. Going on his advice, I joined #webkit on irc.freenode.net and started discussing a few issues with one of the developers there. He (or she) was extremely helpful in assisting me to successfully build WebKit. I was also directed to a Wiki page which included similar instructions to the post on as days pass by.

I felt compelled to write this post based on specific instructions

surrounding Ubuntu Feisty but would like to give much credit to the

hard work of others.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/552330.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

button 样式_缩减 SCSS 50%样式代码的 14 条实战经验

原标题:缩减 SCSS 50%样式代码的 14 条实战经验作者:feishi123前言Sass是CSS3语言的扩展,它能帮你更省事地写出更好的样式表,使你摆脱重复劳动,使工作更有创造性。因为你能更快地拥抱变化,你也将敢于在设计…

神舟电脑装linux双系统,个人windows10和Ubuntu18.04游戏笔记本uefi双磁盘双系统安装过程...

此文章为记录自己的Ubuntu的安装和使用过程本人电脑是128G固态500G机械。固态中装的是windows10,这次决定在机械中安装Ubuntu。虽然网上教程很多,但是我仍然是在参考了多个教程后才动手安装,于是记录自己的安装过程。该机器是神舟Z6-sl7d1,系…

请解释自动装配模式的区别?_如何从齿条优化方面有效节约机床装配时间

齿条:螺纹连接的设计和计算是否正确?如果我们真的想要节约装配成本和时间的话,那么我们首先就需要去选择设计正确的齿条螺钉。那么这时候就紧接着产生了第二个问题:我们应该如何评估并优化这种设计。当我们去观察比较齿轮和齿条这…

仓库处理中 无法修改_临沂用友U8erp系统软件如何新增仓库?

存货一般是用仓库来保管的,对存货进行核算管理,首先应对仓库进行管理,因此进行仓库设置是供销链管理系统的重要基础准备工作之一。第一次使用本系统时,应先将本单位使用的仓库,预先输入到系统之中,即进行&q…

Dreamwear如何创建javascript_JavaScript 太糟糕,JVM 有妙招!

虽然 JavaScript 凭借其简洁性、交互性等优势横扫了各大编程语言榜单,但是一直以来,JavaScript 应用程序的工具链极其复杂,引发不少开发者吐槽,在此,我们是否有更好的解决方案将其替代?接下来,本…

linux mint 18.3浏览器,在Linux Mint 19/Ubuntu 18.04中安装Tor Browser浏览器的方法

本文介绍在Linux Mint 19/Ubuntu 18.04系统中安装Tor Browser浏览器的方法,本文不使用Tor的默认Ubuntu存储库,因为它们包含旧版本的Tor。一、添加Tor存储库要在Linux Mint 19/Ubuntu 18.04系统中安装最新版本的Tor,我们将使用官方Tor Apt存储…

code block怎样实现图形界面_微服务入门:Openresty实现API网关

概念介绍如果大家清楚“网关”这个概念,那就很容易理解“API网关“,即所有API的入口。 从面向对象设计的角度看,它与外观模式类似,封装了系统内部架构。在单体应用架构中,没有「 API网关 」的概念,每个项目…

vue lang_推荐一个基于Vue 的 H5 快速开发模板

关注 Vue社区,回复“加群”加入我们一起学习,天天进步praisejuejin.im/post/5e612534e51d4527017971a2模板基于 vue-cli4 和 Vant-ui 搭建,进行大型 H5 项目开发最佳实践方案,让我们来一探究竟模板地址 (github.com/push-over/vue…

springboot urlresource_Spring Boot上传文件+部署到Tomcat

1 概述Spring Boot上传文件,根据官方uploadfile示例修改的,可以打成war放到服务器上(笔者使用的是Tomcat).主要步骤是创建异常类,属性类,接口类与控制器类,最后进行少量修改打包部署到服务器上.2 环境win10Tomcat 9.0.30IDEA 2019.03Spring boot 2.2.2 RELEASE3 新建工程选择sp…

alc236黑苹果驱动_台式机黑苹果独显驱动

黑苹果安装离不开黑苹果驱动程序,常见的有网卡驱动、显卡驱动、声卡驱动、还有其他的一些常用的驱动程序,这里我们单独讲一下黑苹果上驱动英伟达GTX的独显驱动,即我们平常说的N卡,如果文章中介绍的有错误,或者您还有其…

c语言break在if中用法,break可用于什么语句 break语句可用于for语句和if语句中 对吗...

c语言中break语句的作用C语言中,break都可以用在什么地方?用到每一个语...break 一般是针对一个循环或者switch中的case,表示跳出当前的循环或选择,即在一个单层循环中,可以通过break 来跳出循环,在switch 中的case通过…

python简单实用案例_Python 21 Django 实用小案例1

8 9 10 {% csrf_token %}11 用户名:12 密码:13 验证码:14 15 16 17

c语言的一段程序,C语言第一个程序(入门)

1.文件类型(基本)c语言源文件 为.c 文件扩展名,例如 main.c 编译后将得到 a.out 文件 运行会得到 我们程序执行的结果2.hello world (第一个程序)#include --------------------> 引入标准库的信息main () { …

matlab table中的文字转string_MATLAB_GUI_教程(2)pushbutton

目录前言上期教程按钮介绍按钮(pushbutton)如何在窗口中创建一个按钮常用属性常用属性练习回调函数的编写规则设置回调函数:定义(编写)回调函数:NoteGUI中各个回调函数之间数据的传递setappdatagetappdata方法按钮的回调函数前言上期教程按钮介绍这个按钮…

python中类和对象_Python里的类和对象简介

---恢复内容开始--- Python里的类 对象属性方法; 对象的属性主要是指主要的特征和参量,而方法主要是指函数; 类是一个具有一定特征和方法的集合,而对象是类的一个;类和对象的关系就如同模具和用这个模具制作出的物品之…

r语言 fread函数参数_R语言 第4章 初级绘图(6)

分析数据间的关系散点矩阵图如果数据框是多维数据,那么plot函数将绘制出两两之间散点图组合成为散点矩阵图(matrix of scatterplots)。散点矩阵图将多个散点图组合起来,以便可以同时浏览多个二元变量关系,一定程度上克服了在平面上展示高维数…

android 渠道打包工具,Android渠道打包技术小结

导读本文对比了渠道4种渠道打包方式:与iOS的单一渠道(AppStore)不同,Android平台在国内的渠道多入牛毛。以我们的App为例,就有27个普通渠道(应用宝,百度,360这种)和更多的推广专用渠道。我们打包技术也经过了若干次的改进。1.利用…

机械臂中的四元素转为旋转矩阵_雅克比矩阵(上)雅克比推导

1、前言 回顾前面几期的内容,在第一期中介绍了机器人的正/逆运动学建模,正运动学解决的问题是如何从关节空间的关节变量描述操作空间的位姿,反之则是逆运动学的内容。将操作空间和关节的空间的关系用以下关系式进行表达。机器人正/逆运动…

DS1819 对应版本的FFMPEG_OpenCV开发笔记(七十):红胖子带你傻瓜式编译VS2017x64版本的openCV4...

若该文为原创文章,转载请注明出处本文章博客地址:https://blog.csdn.net/qq21497936/article/details/107837715各位读者,知识无穷而人力有穷,要么改需求,要么找专业人士,要么自己研究红胖子(红模仿)的博文…

用Android打出马奔跑的动画,一款非常好用的动画库Lottie

简介Lottie是Android和iOS的移动图书馆,用于解析Adobe After Effects动画,并以Bodymovin作为json导出,并在手机和网络上本机呈现。该项目在GitHub已经获得三个端累计3万的star。在Lottie社区提供了更多的动画下载。如果你是一个设计师还可以将…