From facb0ce5a14563d427e97f4c861ca4ffc0b067aa Mon Sep 17 00:00:00 2001 From: CefView Date: Sat, 18 Nov 2023 04:39:03 +0000 Subject: [PATCH] Update from https://github.com/CefView/QCefViewDoc/commit/108634eae15d355865a886b3333b0c4bc98ddeae --- 404.html | 4 ++-- assets/js/{0f898468.fbdbee18.js => 0f898468.417b263a.js} | 2 +- .../{runtime~main.3a23efae.js => runtime~main.209c705e.js} | 2 +- docs/guide/CefviewQuery/index.html | 4 ++-- docs/guide/FirstProject/index.html | 4 ++-- docs/guide/Interoperability/index.html | 4 ++-- docs/guide/LoadWebResource/index.html | 4 ++-- docs/guide/index.html | 4 ++-- docs/intros/buiding/index.html | 6 +++--- docs/intros/change-cef-ver/index.html | 4 ++-- docs/intros/index.html | 4 ++-- docs/reference/QCefConfig/index.html | 4 ++-- docs/reference/QCefContext/index.html | 4 ++-- docs/reference/QCefDownloadItem/index.html | 4 ++-- docs/reference/QCefEvent/index.html | 4 ++-- docs/reference/QCefQuery/index.html | 4 ++-- docs/reference/QCefSetting/index.html | 4 ++-- docs/reference/QCefView/index.html | 4 ++-- docs/reference/WebAPIs/index.html | 4 ++-- docs/reference/index.html | 4 ++-- index.html | 4 ++-- 21 files changed, 41 insertions(+), 41 deletions(-) rename assets/js/{0f898468.fbdbee18.js => 0f898468.417b263a.js} (98%) rename assets/js/{runtime~main.3a23efae.js => runtime~main.209c705e.js} (82%) diff --git a/404.html b/404.html index 9f9c500e..85cf3598 100644 --- a/404.html +++ b/404.html @@ -4,13 +4,13 @@ Page Not Found | QCefView - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/assets/js/0f898468.fbdbee18.js b/assets/js/0f898468.417b263a.js similarity index 98% rename from assets/js/0f898468.fbdbee18.js rename to assets/js/0f898468.417b263a.js index 2c971595..918b14e9 100644 --- a/assets/js/0f898468.fbdbee18.js +++ b/assets/js/0f898468.417b263a.js @@ -1 +1 @@ -"use strict";(self.webpackChunkqcefviewdoc=self.webpackChunkqcefviewdoc||[]).push([[748],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var u=r.createContext({}),s=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=s(e.components);return r.createElement(u.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,u=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=s(n),m=i,f=p["".concat(u,".").concat(m)]||p[m]||d[m]||a;return n?r.createElement(f,o(o({ref:t},c),{},{components:n})):r.createElement(f,o({ref:t},c))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=m;var l={};for(var u in t)hasOwnProperty.call(t,u)&&(l[u]=t[u]);l.originalType=e,l[p]="string"==typeof e?e:i,o[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>l,toc:()=>s});var r=n(7462),i=(n(7294),n(3905));const a={sidebar_position:1},o="Building Instruction",l={unversionedId:"intros/buiding",id:"intros/buiding",title:"Building Instruction",description:"Prerequisites",source:"@site/docs/intros/buiding.md",sourceDirName:"intros",slug:"/intros/buiding",permalink:"/QCefView/docs/intros/buiding",draft:!1,editUrl:"https://github.com/CefView/QCefViewDoc/tree/master/docs/intros/buiding.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"default",previous:{title:"Getting Started",permalink:"/QCefView/docs/intros/"},next:{title:"Change CEF version",permalink:"/QCefView/docs/intros/change-cef-ver"}},u={},s=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"1. CMake",id:"1-cmake",level:3},{value:"2. Qt",id:"2-qt",level:3},{value:"Build",id:"build",level:2},{value:"Windows",id:"windows",level:3},{value:"macOS",id:"macos",level:3},{value:"Linux",id:"linux",level:3}],c={toc:s},p="wrapper";function d(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"building-instruction"},"Building Instruction"),(0,i.kt)("h2",{id:"prerequisites"},"Prerequisites"),(0,i.kt)("h3",{id:"1-cmake"},"1. CMake"),(0,i.kt)("p",null,"QCefView project is managed with ",(0,i.kt)("a",{parentName:"p",href:"https://cmake.org/"},"CMake"),", thus you need to install CMake first. The minimum supported CMake version is 3.19.1, but the latest version is recommended."),(0,i.kt)("h3",{id:"2-qt"},"2. Qt"),(0,i.kt)("p",null,"QCefView is based on Qt framework\uff0cboth Qt 5.x or 6.x are supported. After installation, please add the environment variable ",(0,i.kt)("strong",{parentName:"p"},(0,i.kt)("inlineCode",{parentName:"strong"},"QTDIR"))," to point to the Qt location, for example:"),(0,i.kt)("p",null,"On Windows:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bat"},"set QTDIR=C:\\Qt\\6.2.2\\msvc2019_64\n")),(0,i.kt)("p",null,"On macOS:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"export QTDIR=/usr/local/Cellar/qt5/5.4.1/clang_64\n")),(0,i.kt)("p",null,"On Linux:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"export QTDIR=/usr/share/Qt/6.2.2/gcc_64\n")),(0,i.kt)("h2",{id:"build"},"Build"),(0,i.kt)("p",null,"Just check out the repo from ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/CefView/QCefView"},"https://github.com/CefView/QCefView"),", then init the submodule. This repo depends on the submodule ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/CefView/CefViewCore"},"https://github.com/CefView/CefViewCore"),". "),(0,i.kt)("p",null,"You can clone the code using the following git command:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"git clone --recursive https://github.com/CefView/QCefView.git\n")),(0,i.kt)("h3",{id:"windows"},"Windows"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"# Generate VS projects\ngenerate-win-x86_64.bat\n\n# Build from cmake\ncmake --build .build/windows.x86_64\n")),(0,i.kt)("p",null,"Find the project file in folder .build /windows.x86_64, you can also open the project with Visual Studio and build it."),(0,i.kt)("h3",{id:"macos"},"macOS"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"# Generate Xcode project\n./generate-mac-x86_64.sh\n\n# Build from cmake \ncmake --build .build/macos.x86_64\n")),(0,i.kt)("p",null,"Find the project file in folder .build /macos.x86_64, you can also open the project with Xcode and build it."),(0,i.kt)("h3",{id:"linux"},"Linux"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"# Generate Unix Make file project\n./generate-linux-x86_64.sh\n\n# Build from cmake \ncmake --build .build/linux-x86_64\n")),(0,i.kt)("p",null,"On Linux platform, Qt Creator is recommended as the IDE."))}d.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkqcefviewdoc=self.webpackChunkqcefviewdoc||[]).push([[748],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var u=r.createContext({}),s=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=s(e.components);return r.createElement(u.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,u=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=s(n),m=i,f=p["".concat(u,".").concat(m)]||p[m]||d[m]||a;return n?r.createElement(f,o(o({ref:t},c),{},{components:n})):r.createElement(f,o({ref:t},c))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=m;var l={};for(var u in t)hasOwnProperty.call(t,u)&&(l[u]=t[u]);l.originalType=e,l[p]="string"==typeof e?e:i,o[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>l,toc:()=>s});var r=n(7462),i=(n(7294),n(3905));const a={sidebar_position:1},o="Building Instruction",l={unversionedId:"intros/buiding",id:"intros/buiding",title:"Building Instruction",description:"Prerequisites",source:"@site/docs/intros/buiding.md",sourceDirName:"intros",slug:"/intros/buiding",permalink:"/QCefView/docs/intros/buiding",draft:!1,editUrl:"https://github.com/CefView/QCefViewDoc/tree/master/docs/intros/buiding.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"default",previous:{title:"Getting Started",permalink:"/QCefView/docs/intros/"},next:{title:"Change CEF version",permalink:"/QCefView/docs/intros/change-cef-ver"}},u={},s=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"1. CMake",id:"1-cmake",level:3},{value:"2. Qt",id:"2-qt",level:3},{value:"Build",id:"build",level:2},{value:"Windows",id:"windows",level:3},{value:"macOS",id:"macos",level:3},{value:"Linux",id:"linux",level:3}],c={toc:s},p="wrapper";function d(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"building-instruction"},"Building Instruction"),(0,i.kt)("h2",{id:"prerequisites"},"Prerequisites"),(0,i.kt)("h3",{id:"1-cmake"},"1. CMake"),(0,i.kt)("p",null,"QCefView project is managed with ",(0,i.kt)("a",{parentName:"p",href:"https://cmake.org/"},"CMake"),", thus you need to install CMake first. The minimum supported CMake version is 3.19.1, but the latest version is recommended."),(0,i.kt)("h3",{id:"2-qt"},"2. Qt"),(0,i.kt)("p",null,"QCefView is based on Qt framework\uff0cboth Qt 5.x or 6.x are supported. After installation, please add the environment variable ",(0,i.kt)("strong",{parentName:"p"},(0,i.kt)("inlineCode",{parentName:"strong"},"QTDIR"))," to point to the Qt location, for example:"),(0,i.kt)("p",null,"On Windows:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bat"},"set QTDIR=C:\\Qt\\6.2.2\\msvc2019_64\n")),(0,i.kt)("p",null,"On macOS:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"export QTDIR=/usr/local/Cellar/qt5/5.4.1/clang_64\n")),(0,i.kt)("p",null,"On Linux:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"export QTDIR=/usr/share/Qt/6.2.2/gcc_64\n")),(0,i.kt)("h2",{id:"build"},"Build"),(0,i.kt)("p",null,"Just check out the repo from ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/CefView/QCefView"},"https://github.com/CefView/QCefView"),", then init the submodule. This repo depends on the submodule ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/CefView/CefViewCore"},"https://github.com/CefView/CefViewCore"),". "),(0,i.kt)("p",null,"You can clone the code using the following git command:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"git clone --recursive https://github.com/CefView/QCefView.git\n")),(0,i.kt)("h3",{id:"windows"},"Windows"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"# Generate VS projects\ngenerate-win-x86_64.bat\n\n# Build from cmake\ncmake --build .build/windows.x86_64\n")),(0,i.kt)("p",null,"Find the project file in folder .build /windows.x86_64, you can also open the project with Visual Studio and build it."),(0,i.kt)("h3",{id:"macos"},"macOS"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"# Generate Xcode project\n./generate-mac-x86_64.sh\n\n# Build from cmake \ncmake --build .build/macos.x86_64\n")),(0,i.kt)("p",null,"Find the project file in folder .build /macos.x86_64, you can also open the project with Xcode and build it."),(0,i.kt)("h3",{id:"linux"},"Linux"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"# Generate Unix Make file project\n./generate-linux-x86_64.sh\n\n# Build from cmake \ncmake --build .build/linux.x86_64\n")),(0,i.kt)("p",null,"On Linux platform, Qt Creator is recommended as the IDE."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.3a23efae.js b/assets/js/runtime~main.209c705e.js similarity index 82% rename from assets/js/runtime~main.3a23efae.js rename to assets/js/runtime~main.209c705e.js index fee18db8..8d770e16 100644 --- a/assets/js/runtime~main.3a23efae.js +++ b/assets/js/runtime~main.209c705e.js @@ -1 +1 @@ -(()=>{"use strict";var e,t,r,a,o,d={},n={};function f(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={id:e,loaded:!1,exports:{}};return d[e].call(r.exports,r,r.exports,f),r.loaded=!0,r.exports}f.m=d,f.c=n,e=[],f.O=(t,r,a,o)=>{if(!r){var d=1/0;for(u=0;u=o)&&Object.keys(f.O).every((e=>f.O[e](r[i])))?r.splice(i--,1):(n=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,a,o]},f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);f.r(o);var d={};t=t||[null,r({}),r([]),r(r)];for(var n=2&a&&e;"object"==typeof n&&!~t.indexOf(n);n=r(n))Object.getOwnPropertyNames(n).forEach((t=>d[t]=()=>e[t]));return d.default=()=>e,f.d(o,d),o},f.d=(e,t)=>{for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce(((t,r)=>(f.f[r](e,t),t)),[])),f.u=e=>"assets/js/"+({14:"38a06a83",53:"935f2afb",113:"a445ee84",138:"6dd6422d",195:"c4f5d8e4",215:"223e8241",216:"dc1e63a8",254:"fc845597",287:"67e37d85",332:"895d7fdb",416:"418fadab",450:"74f36475",514:"1be78505",579:"58d2dba7",582:"aa40ee62",748:"0f898468",751:"1a3c9b31",797:"7d4685ea",885:"48d76858",915:"1f3d9971",918:"17896441",956:"226c193e",974:"2d5d2399"}[e]||e)+"."+{14:"6b6c6a03",53:"3e30d9cf",113:"bedfeeb0",138:"a5173d14",195:"1ee5ce01",215:"aa6d001d",216:"a1b17740",254:"b03f5820",287:"2de94f4b",332:"8406e34b",416:"b6974995",450:"b4b570a8",514:"1eb05eca",579:"1623daeb",582:"93f4dd3d",748:"fbdbee18",751:"8260164a",797:"634a6c0e",885:"4beddfd3",915:"5f99ba7d",918:"0c84bcce",956:"f931658b",972:"86918b89",974:"3b79c53a"}[e]+".js",f.miniCssF=e=>{},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="qcefviewdoc:",f.l=(e,t,r,d)=>{if(a[e])a[e].push(t);else{var n,i;if(void 0!==r)for(var c=document.getElementsByTagName("script"),u=0;u{n.onerror=n.onload=null,clearTimeout(s);var o=a[e];if(delete a[e],n.parentNode&&n.parentNode.removeChild(n),o&&o.forEach((e=>e(r))),t)return t(r)},s=setTimeout(b.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=b.bind(null,n.onerror),n.onload=b.bind(null,n.onload),i&&document.head.appendChild(n)}},f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.p="/QCefView/",f.gca=function(e){return e={17896441:"918","38a06a83":"14","935f2afb":"53",a445ee84:"113","6dd6422d":"138",c4f5d8e4:"195","223e8241":"215",dc1e63a8:"216",fc845597:"254","67e37d85":"287","895d7fdb":"332","418fadab":"416","74f36475":"450","1be78505":"514","58d2dba7":"579",aa40ee62:"582","0f898468":"748","1a3c9b31":"751","7d4685ea":"797","48d76858":"885","1f3d9971":"915","226c193e":"956","2d5d2399":"974"}[e]||e,f.p+f.u(e)},(()=>{var e={303:0,532:0};f.f.j=(t,r)=>{var a=f.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>a=e[t]=[r,o]));r.push(a[2]=o);var d=f.p+f.u(t),n=new Error;f.l(d,(r=>{if(f.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),d=r&&r.target&&r.target.src;n.message="Loading chunk "+t+" failed.\n("+o+": "+d+")",n.name="ChunkLoadError",n.type=o,n.request=d,a[1](n)}}),"chunk-"+t,t)}},f.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,d=r[0],n=r[1],i=r[2],c=0;if(d.some((t=>0!==e[t]))){for(a in n)f.o(n,a)&&(f.m[a]=n[a]);if(i)var u=i(f)}for(t&&t(r);c{"use strict";var e,t,r,a,o,d={},n={};function f(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={id:e,loaded:!1,exports:{}};return d[e].call(r.exports,r,r.exports,f),r.loaded=!0,r.exports}f.m=d,f.c=n,e=[],f.O=(t,r,a,o)=>{if(!r){var d=1/0;for(u=0;u=o)&&Object.keys(f.O).every((e=>f.O[e](r[c])))?r.splice(c--,1):(n=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,a,o]},f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);f.r(o);var d={};t=t||[null,r({}),r([]),r(r)];for(var n=2&a&&e;"object"==typeof n&&!~t.indexOf(n);n=r(n))Object.getOwnPropertyNames(n).forEach((t=>d[t]=()=>e[t]));return d.default=()=>e,f.d(o,d),o},f.d=(e,t)=>{for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce(((t,r)=>(f.f[r](e,t),t)),[])),f.u=e=>"assets/js/"+({14:"38a06a83",53:"935f2afb",113:"a445ee84",138:"6dd6422d",195:"c4f5d8e4",215:"223e8241",216:"dc1e63a8",254:"fc845597",287:"67e37d85",332:"895d7fdb",416:"418fadab",450:"74f36475",514:"1be78505",579:"58d2dba7",582:"aa40ee62",748:"0f898468",751:"1a3c9b31",797:"7d4685ea",885:"48d76858",915:"1f3d9971",918:"17896441",956:"226c193e",974:"2d5d2399"}[e]||e)+"."+{14:"6b6c6a03",53:"3e30d9cf",113:"bedfeeb0",138:"a5173d14",195:"1ee5ce01",215:"aa6d001d",216:"a1b17740",254:"b03f5820",287:"2de94f4b",332:"8406e34b",416:"b6974995",450:"b4b570a8",514:"1eb05eca",579:"1623daeb",582:"93f4dd3d",748:"417b263a",751:"8260164a",797:"634a6c0e",885:"4beddfd3",915:"5f99ba7d",918:"0c84bcce",956:"f931658b",972:"86918b89",974:"3b79c53a"}[e]+".js",f.miniCssF=e=>{},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="qcefviewdoc:",f.l=(e,t,r,d)=>{if(a[e])a[e].push(t);else{var n,c;if(void 0!==r)for(var i=document.getElementsByTagName("script"),u=0;u{n.onerror=n.onload=null,clearTimeout(s);var o=a[e];if(delete a[e],n.parentNode&&n.parentNode.removeChild(n),o&&o.forEach((e=>e(r))),t)return t(r)},s=setTimeout(b.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=b.bind(null,n.onerror),n.onload=b.bind(null,n.onload),c&&document.head.appendChild(n)}},f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.p="/QCefView/",f.gca=function(e){return e={17896441:"918","38a06a83":"14","935f2afb":"53",a445ee84:"113","6dd6422d":"138",c4f5d8e4:"195","223e8241":"215",dc1e63a8:"216",fc845597:"254","67e37d85":"287","895d7fdb":"332","418fadab":"416","74f36475":"450","1be78505":"514","58d2dba7":"579",aa40ee62:"582","0f898468":"748","1a3c9b31":"751","7d4685ea":"797","48d76858":"885","1f3d9971":"915","226c193e":"956","2d5d2399":"974"}[e]||e,f.p+f.u(e)},(()=>{var e={303:0,532:0};f.f.j=(t,r)=>{var a=f.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>a=e[t]=[r,o]));r.push(a[2]=o);var d=f.p+f.u(t),n=new Error;f.l(d,(r=>{if(f.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),d=r&&r.target&&r.target.src;n.message="Loading chunk "+t+" failed.\n("+o+": "+d+")",n.name="ChunkLoadError",n.type=o,n.request=d,a[1](n)}}),"chunk-"+t,t)}},f.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,d=r[0],n=r[1],c=r[2],i=0;if(d.some((t=>0!==e[t]))){for(a in n)f.o(n,a)&&(f.m[a]=n[a]);if(c)var u=c(f)}for(t&&t(r);i CefViewQuery | QCefView - +

CefViewQuery

window.CefViewQuery(query) is yet another approach to communicate from Javascript to C++ code, but in this way the communication is ASYNCHRONOUS operation. For more details please refer to the API reference.

When this method gets called from Javascript, the following Qt signal will be emitted:

public void cefQueryRequest(int browserId,int frameId,const QCefQuery & query)

In this section let's demonstrate the usage of CefViewQuery with some simple code.

Add Javascript Code

Add Javascript code as follows:

    function onCallBridgeQueryClicked() {
var query = {
request: document.getElementById("message").value,
onSuccess: function (response) {
alert(response);
},
onFailure: function (error_code, error_message) {
alert(error_message);
},
};
window.CefViewQuery(query);
}

Add HTML code as follows:

    <label> Test Case for QCefQuery </label>
<br />
<textarea id="message" style="width: 320px; height: 120px">
this message will be processed by native code.
</textarea>
<br />
<input type="button" value="Query" onclick="onCallBridgeQueryClicked()" />

Add C++ Code

Add C++ code as follows:

MainWindow::MainWindow(QWidget* parent)
: QMainWindow(parent)
{
// ...

// connect the cefQueryRequest to the slot
connect(cefViewWidget,
SIGNAL(cefQueryRequest(int, int, const QCefQuery&)),
this,
SLOT(onQCefQueryRequest(int, int, const QCefQuery&)));

// ...
}

void
MainWindow::onQCefQueryRequest(int browserId, int frameId, const QCefQuery& query)
{
QMetaObject::invokeMethod(
this,
[=]() {
QString title("QCef Query Request");
QString text = QString("Current Thread: QT_UI\r\n"
"Query: %1")
.arg(query.request());

QMessageBox::information(this->window(), title, text);

QString response = query.request().toUpper();
query.setResponseResult(true, response);
cefViewWidget->responseQCefQuery(query);
},
Qt::QueuedConnection);
}

Run the Application

Now let's run the application.

First Project

Click the button in web area to invoke the C++ code

First Project

- + \ No newline at end of file diff --git a/docs/guide/FirstProject/index.html b/docs/guide/FirstProject/index.html index 81bc0baf..eebd8de1 100644 --- a/docs/guide/FirstProject/index.html +++ b/docs/guide/FirstProject/index.html @@ -4,13 +4,13 @@ First Project | QCefView - +

First Project

Create a Qt GUI application with either Qt creator or other supported IDE.

Initialize QCefContext instance

To consume QCefView, the first step is to initialize an instance of QCefContext. This is like the QApplication, there must be only one instance of QCefContext in the application lifecycle.

#include <QApplication>
#include <QCefContext.h>
#include "MainWindow.h"

int
main(int argc, char* argv[])
{
// create QApplication instance
QApplication a(argc, argv);

// build QCefConfig
QCefConfig config;
// set user agent
config.setUserAgent("QCefViewTest");
// set log level
config.setLogLevel(QCefConfig::LOGSEVERITY_DEFAULT);
// set JSBridge object name (default value is QCefViewClient)
config.setBridgeObjectName("CallBridge");
// port for remote debugging (default is 0 and means to disable remote debugging)
config.setRemoteDebuggingPort(9000);
// set background color for all browsers
// (QCefSetting.setBackgroundColor will overwrite this value for specified browser instance)
config.setBackgroundColor(Qt::lightGray);

// WindowlessRenderingEnabled is set to true by default,
// set to false to disable the OSR mode
config.setWindowlessRenderingEnabled(true);

// add command line args, you can any cef supported switches or parameters
config.addCommandLineSwitch("use-mock-keychain");
// config.addCommandLineSwitch("disable-gpu");
// config.addCommandLineSwitch("enable-media-stream");
// config.addCommandLineSwitch("allow-file-access-from-files");
// config.addCommandLineSwitch("disable-spell-checking");
// config.addCommandLineSwitch("disable-site-isolation-trials");
// config.addCommandLineSwitch("enable-aggressive-domstorage-flushing");
config.addCommandLineSwitchWithValue("renderer-process-limit", "1");
// config.addCommandLineSwitchWithValue("disable-features", "BlinkGenPropertyTrees,TranslateUI,site-per-process");

// create QCefContext instance with config,
// the lifecycle of cefContext must be the same as QApplication instance
QCefContext cefContext(&a, argc, argv, &config);

// application window
MainWindow w;
w.show();

// flying
return a.exec();
}

As you can see we need a QCefConfig to initialize the QCefContext. You could set some global parameters of CEF with QCefConfig instance, for example the log level, user agent name and debugging port. For more details please refer to the QCefConfig references.

Do not try to destruct the QCefContext instance explicitly or you will break the lifecycle of the CEF stuff.

Create QCefView Instance

Once you have initialize QCefContext, you can create QCefView instance.

  // build settings for per QCefView
QCefSetting setting;
// here we just set the default background to blue
setting.setBackgroundColor(QColor::fromRgb(0, 0, 255));

// create the QCefView widget and add it to the layout container
cefViewWidget = new QCefView(uri, &setting, this);
ui.cefContainer->layout()->addWidget(cefViewWidget);
layout->addWidget(ui.cefContainer);

Create a simple web page

Create a simple web page with the following content:

<html>
<head>
</head>
<body id="main" class="noselect">
<h1 align="center" style="font-size: 12pt">Web Area</h1>
</body>
</html>

Run the application

Now lets run the application.

First Project

- + \ No newline at end of file diff --git a/docs/guide/Interoperability/index.html b/docs/guide/Interoperability/index.html index e13a208a..e870da14 100644 --- a/docs/guide/Interoperability/index.html +++ b/docs/guide/Interoperability/index.html @@ -4,13 +4,13 @@ Interoperability | QCefView - +

Interoperability

QCefView provides the capabilities of interoperability between native context and web context, thus the developer can call Javascript from C++ code easily, vice versa.

The approach of the interoperability was implemented by inserting a bridge object into the web context displayed in all the frames and browsers managed by QCefView. The bridge object provides methods for communicating with native code. For more details please refer to the API reference WebAPIs

The bridge object is mounted at window object, and the object name could be configured through the QCefConfig::setBridgeObjectName. The default name is CefViewClient

Call C++ from Javascript

The bridge object provides the following method to invoke C++ code from Javascript

invokeMethod(name, ...args),

When this method gets called from Javascript, the following Qt signal will be emitted

void invokeMethod(int browserId,int frameId,const QString & method,const QVariantList & arguments)

⚠ NOTE: The Javascript method invokeMethod(name, ...args) is ASYNCHRONOUS operation, that means the calling from Javascript returns immediately regardless the execution of C++ Qt slot

Now let's write a small piece of code to demonstrate the invocation from Javascript to C++.

Add Javascript Code

First add Javascript code as follows into the \<script> block

    function onInvokeMethodClicked(name, ...arg) {
// invoke C++ code
window.CallBridge.invokeMethod(name, ...arg);
}

and add the html code

    <label> Test Case for InvokeMethod </label>
<br />
<input
type="button"
value="Invoke Method"
onclick="onInvokeMethodClicked('TestMethod', 1, false, 'arg3')"
/>

Add C++ Code

Then add code in C++ to handle the invocation

MainWindow::MainWindow(QWidget* parent)
: QMainWindow(parent)
{
// ...

// connect the invokeMethod to the slot
connect(cefViewWidget,
SIGNAL(invokeMethod(int, int, const QString&, const QVariantList&)),
this,
SLOT(onInvokeMethod(int, int, const QString&, const QVariantList&)));
// ...
}

void
MainWindow::onInvokeMethod(int browserId, int frameId, const QString& method, const QVariantList& arguments)
{
// extract the arguments and dispatch the invocation to corresponding handler
if (0 == method.compare("TestMethod")) {
QMetaObject::invokeMethod(
this,
[=]() {
QString title("QCef InvokeMethod Notify");
QString text = QString("Current Thread: QT_UI\r\n"
"Method: %1\r\n"
"Arguments:\r\n")
.arg(method);

for (int i = 0; i < arguments.size(); i++) {
// clang-format off
text.append(QString("%1 Type:%2, Value:%3\r\n")
.arg(i)
.arg(arguments[i].typeName())
.arg(arguments[i].toString()));
// clang-format on
}

QMessageBox::information(this->window(), title, text);
},
Qt::QueuedConnection);
} else {
}
}

Run the Application

Now let's run the application.

First Project

Click the button in web area to invoke the C++ code

First Project

Call Javascript from C++

The bridge object provides the following methods to support calling from C++ code to Javascript

The developers can add as many event listeners as they want in the Javascript context and trigger the events from C++ code with the following methods

⚠ NOTE: All the 3 methods above are ASYNCHRONOUS operations

Now let's code it

Add Javascript Code

Add code to the javascript

    function onLoad() {
// Add a event listener to handle the event named 'colorChange'
Window.CallBridge.addEventListener(
// event name
"colorChange"
// event handler
function (color) {
// change the background color
document.getElementById("main").style.backgroundColor = color;
}
);
}

Add code to the html

<body onload="onLoad()" id="main" class="noselect">

Add C++ Code

Add code to trigger the event be handled in Javascript, here we need to add a button in perform the triggering, we just show the button click action handler slot.

void
MainWindow::onBtnChangeColorClicked()
{
if (cefViewWidget) {
// create a random color
QColor color(QRandomGenerator::global()->generate());

// create the cef event and set the arguments
QCefEvent event("colorChange");
event.arguments().append(QVariant::fromValue(color.name(QColor::HexArgb)));

// broadcast the event to all frames in all browsers created by this QCefView widget
cefViewWidget->broadcastEvent(event);
}
}

Run the Application

Now let's run the application.

First Project

Click the button in native area to invoke the Javascript code

First Project

- + \ No newline at end of file diff --git a/docs/guide/LoadWebResource/index.html b/docs/guide/LoadWebResource/index.html index 38f6f04c..fdbe7e43 100644 --- a/docs/guide/LoadWebResource/index.html +++ b/docs/guide/LoadWebResource/index.html @@ -4,13 +4,13 @@ Load WebApp Resource | QCefView - +

Load WebApp Resource

To load the web resource, QCefView provide 4 methods to achieve it.

1. Load Online Web Resource

You can pass the full URL of the webpage to the constructor of QCefView.

  // build settings for per QCefView
QCefSetting setting;

// create the QCefView widget and add it to the layout container
QCefView* cefView = new QCefView("https://google.com", &setting, nullptr);

2. Load Local File With File Path

Pass the absolute file path of the web resource file to the constructor of QCefView. Note the file path must be started by "file://" schema.

  // build the path to the web resource
QDir dir = QCoreApplication::applicationDirPath();
QString webResourceDir = QString("file://") + QDir::toNativeSeparators(dir.filePath("webres/index.html"));

// build settings for per QCefView
QCefSetting setting;

// create the QCefView widget and add it to the layout container
QCefView* cefView = new QCefView(INDEX_URL, &setting, nullptr);

3. Add Local Folder Mapping

If you need to load the entire WebApp output folder, you can choose to add a local folder mapping item with the following method:

public void addLocalFolderResource(const QString & path,const QString & url,int priority)

For example, you build the WebApp project and get the output folder webres, the folder structure is as follows:

full\path\to\webres
│ index.html
├───assets
├───docs
├───img

You can add a mapping item with the following code:

 // add a local folder to URL map
QCefContext::instance()->addLocalFolderResource(
"full\\path\\to\\webres",
"https://domainname" // This could be any URL you need
);

// build settings for per QCefView
QCefSetting setting;

// create the QCefView widget and add it to the layout container
QCefView* cefView = new QCefView(
"https://domainname/index.html",
&setting,
this
);

After added the mapping item, you can access all the resource with the URL root appended by the resource relative path.

4. Add Local Archive Mapping

The resource mapping can also be URL to archive file, add it with the following method:

public void addArchiveResource(const QString & path,const QString & url,const QString & password)

You need to keep the folder structure in the archive file, for example:

full\path\to\webres.zip
│ index.html
├───assets
├───docs
├───img

You can add a mapping item with the following code:

 // add a local zip file to URL map
QCefContext::instance()->addArchiveResource(
"full\\path\\to\\webres.zip",
"https://domainname",
"password" // pass the password of the zip file if needed
);

// build settings for per QCefView
QCefSetting setting;

// create the QCefView widget and add it to the layout container
QCefView* cefView = new QCefView(
"https://domainname/index.html",
&setting,
this
);

Use Cases

The above 3 & 4 are very useful when you develop your WebApp with the popular framework like React, Vue or some others, especially you are building SPA WebApp.

- + \ No newline at end of file diff --git a/docs/guide/index.html b/docs/guide/index.html index 837a5d1f..4ff4f4b0 100644 --- a/docs/guide/index.html +++ b/docs/guide/index.html @@ -4,13 +4,13 @@ Guide | QCefView - +

Guide

Now let's start building an application step by step and explore the capabilities of QCefView.

The source code is in the example folder of QCefView project, please refer to QCefViewTest.

- + \ No newline at end of file diff --git a/docs/intros/buiding/index.html b/docs/intros/buiding/index.html index fff5fbac..eab3968d 100644 --- a/docs/intros/buiding/index.html +++ b/docs/intros/buiding/index.html @@ -4,13 +4,13 @@ Building Instruction | QCefView - +
-

Building Instruction

Prerequisites

1. CMake

QCefView project is managed with CMake, thus you need to install CMake first. The minimum supported CMake version is 3.19.1, but the latest version is recommended.

2. Qt

QCefView is based on Qt framework,both Qt 5.x or 6.x are supported. After installation, please add the environment variable QTDIR to point to the Qt location, for example:

On Windows:

set QTDIR=C:\Qt\6.2.2\msvc2019_64

On macOS:

export QTDIR=/usr/local/Cellar/qt5/5.4.1/clang_64

On Linux:

export QTDIR=/usr/share/Qt/6.2.2/gcc_64

Build

Just check out the repo from https://github.com/CefView/QCefView, then init the submodule. This repo depends on the submodule https://github.com/CefView/CefViewCore.

You can clone the code using the following git command:

git clone --recursive https://github.com/CefView/QCefView.git

Windows

# Generate VS projects
generate-win-x86_64.bat

# Build from cmake
cmake --build .build/windows.x86_64

Find the project file in folder .build /windows.x86_64, you can also open the project with Visual Studio and build it.

macOS

# Generate Xcode project
./generate-mac-x86_64.sh

# Build from cmake
cmake --build .build/macos.x86_64

Find the project file in folder .build /macos.x86_64, you can also open the project with Xcode and build it.

Linux

# Generate Unix Make file project
./generate-linux-x86_64.sh

# Build from cmake
cmake --build .build/linux-x86_64

On Linux platform, Qt Creator is recommended as the IDE.

- +

Building Instruction

Prerequisites

1. CMake

QCefView project is managed with CMake, thus you need to install CMake first. The minimum supported CMake version is 3.19.1, but the latest version is recommended.

2. Qt

QCefView is based on Qt framework,both Qt 5.x or 6.x are supported. After installation, please add the environment variable QTDIR to point to the Qt location, for example:

On Windows:

set QTDIR=C:\Qt\6.2.2\msvc2019_64

On macOS:

export QTDIR=/usr/local/Cellar/qt5/5.4.1/clang_64

On Linux:

export QTDIR=/usr/share/Qt/6.2.2/gcc_64

Build

Just check out the repo from https://github.com/CefView/QCefView, then init the submodule. This repo depends on the submodule https://github.com/CefView/CefViewCore.

You can clone the code using the following git command:

git clone --recursive https://github.com/CefView/QCefView.git

Windows

# Generate VS projects
generate-win-x86_64.bat

# Build from cmake
cmake --build .build/windows.x86_64

Find the project file in folder .build /windows.x86_64, you can also open the project with Visual Studio and build it.

macOS

# Generate Xcode project
./generate-mac-x86_64.sh

# Build from cmake
cmake --build .build/macos.x86_64

Find the project file in folder .build /macos.x86_64, you can also open the project with Xcode and build it.

Linux

# Generate Unix Make file project
./generate-linux-x86_64.sh

# Build from cmake
cmake --build .build/linux.x86_64

On Linux platform, Qt Creator is recommended as the IDE.

+ \ No newline at end of file diff --git a/docs/intros/change-cef-ver/index.html b/docs/intros/change-cef-ver/index.html index 722c933f..73480d91 100644 --- a/docs/intros/change-cef-ver/index.html +++ b/docs/intros/change-cef-ver/index.html @@ -4,13 +4,13 @@ Change CEF version | QCefView - +

Change CEF version

If you want to change the version of CEF binary distribution, please follow the instructions:

1. Find Target Version

Find the target version you want from the CEF Automated Builds website: https://cef-builds.spotifycdn.com/index.html.

2. Modify QCefConfig.cmake

Change the CEF version in the CefView/CefViewCore/ CefConfig.cmake file.

Normally you just need to change the first line command:

set(CEF_SDK_VERSION "112.3.0+gb09c4ca+chromium-112.0.5615.165")

set the CEF_SDK_VERSION to the target version you want.

Note! The format here is 112.3.0+gb09c4ca+chromium-112.0.5615.165,not cef_binary_112.3.0+gb09c4ca+chromium-112.0.5615.165_windows64

3. Build QCefView

Build QCefView project as the instructions described in previous section.

⚠ WARNING: If you choose a very early CEF version or a brand new one which introduces breaking changes, you may need to adapt the CefViewCore repo to the target version manually.

- + \ No newline at end of file diff --git a/docs/intros/index.html b/docs/intros/index.html index 314345b4..71773b2e 100644 --- a/docs/intros/index.html +++ b/docs/intros/index.html @@ -4,13 +4,13 @@ Getting Started | QCefView - +

Getting Started

What's QCefView?

QCefView is a Qt Widget integrated with Chromium Embedded Framework. With QCefView you could build your application to leverage the powerful capabilities of CEF easily.

  • Write the application with familiar Qt forms, signals and slots
  • straightforward interoperability between Web(Javascript) and Native(C++)

Why use QCefView rather than Electron?

QCefView is totally different thing with Electron.

  • QCefView is just a component of Qt framework for UI development while Electron is a comprehensive framework for application development
  • QCefView is designed for Native language developers while Electron is more friendly to Frontend developers
  • QCefView takes C++ as the primary development language while Electron is based on Javascript
  • QCefView provides straightforward interoperability between Web and Native while Electron needs to write plugins

What kinds of application is QCefView good at?

QCefView is good choice if you want to write the UI with Web Frontend technology and the core functions with native languages.

For example:

  • Movie/Music Player
  • Game platforms
  • Utility applications
  • etc.

In the above scenarios, the applications are almost all context based. They need to display some lists, tables or complex pages with cool effect, for these purpose, web frontend technology is really good solution. Just write the UI as WebApp, host it with QCefView (QCefView is like a WebApp container), and keep your hard-core business logic as native developed component, then combine them with the interoperability provide by QCefView.

If you aimed to develop a web browser application, QCefView is not the choice for you. Because QCefView was designed to be an UI component not the browser, thus QCefView disabled some features which are required by a browser. For this purpose, you may prefer the original CEF library.

Do not want Qt, any better choice?

If you don't like Qt you can build the customized CEF view with the original CEF library, for example you can integrate CEF with Cocoa framework like this project CocoaCefView.

- + \ No newline at end of file diff --git a/docs/reference/QCefConfig/index.html b/docs/reference/QCefConfig/index.html index a1359bd7..2bd95711 100644 --- a/docs/reference/QCefConfig/index.html +++ b/docs/reference/QCefConfig/index.html @@ -4,13 +4,13 @@ QCefConfig | QCefView - +

class QCefConfig

Represents the CEF setting. For more details please refer to: https://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage.md#markdown-header-cefsettings.

Summary

MembersDescriptions
public QCefConfig()Constructs a CEF config instance.
public QCefConfig(const QCefConfig & other)Constructs a CEF setting from existing one.
public QCefConfig&operator=(const QCefConfig & other)Assigns an existing config to current.
public ~QCefConfig()Destructs the config.
public void addCommandLineSwitch(const QString & smitch)Adds a switch to the commandline args used to initialize the CEF.
public void addCommandLineSwitchWithValue(const QString & smitch, const QString & v)Adds a switch with value to the commandline args used to initialize the CEF.
public void setWindowlessRenderingEnabled(const bool enabled)Sets the flag to enable/disable OSR mode.
public const QVariant WindowlessRenderingEnabled() constGets the OSR mode flag.
public void setBrowserSubProcessPath(const QString & path)Sets the browser subprocess path.
public const QString browserSubProcessPath() constGets the browser subprocess path.
public void setResourceDirectoryPath(const QString & path)Sets the resource directory path.
public const QString resourceDirectoryPath() constGets the resource directory path.
public void setLocalesDirectoryPath(const QString & path)Sets the locales directory path.
public const QString localesDirectoryPath() constGets the locales directory path.
public void setLogLevel(const LogLevel lvl)Sets the log level.
public const QCefConfig::LogLevel logLevel() constGets the log level.
public void setLocale(const QString & locale)Sets the locale.
public const QString locale() constGets the locale.
public void setUserAgent(const QString & agent)Sets the user agent.
public const QString userAgent() constGets the user agent.
public void setCachePath(const QString & path)Sets the cache directory path.
public const QString cachePath() constGets the cache directory path.
public void setUserDataPath(const QString & path)Sets the user data directory path.
public const QString userDataPath() constGets the user data directory path.
public void setBridgeObjectName(const QString & name)Sets the bridge object name.
public const QString bridgeObjectName() constGets the bridge object name.
public void setBackgroundColor(const QColor & color)Sets the background color of the web page.
public const QVariant backgroundColor() constGets the background color.
public void setAcceptLanguageList(const QString & languages)Sets the acceptable language list.
public const QString acceptLanguageList() constGet the acceptable language list.
public void setPersistSessionCookies(bool enabled)Sets whether to persist session cookie.
public const QVariant persistSessionCookies() constGets whether to persist session cookie.
public void setPersistUserPreferences(bool enabled)Sets whether to persist user preferences.
public const QVariant persistUserPreferences() constGets whether to persist user preferences.
public void setRemoteDebuggingPort(short port)Sets the remote debugging port.
public const QVariant remoteDebuggingPort() constGets the remote debugging port.
enum LogLevelRepresents the log severity.
private QScopedPointer< QCefConfigPrivate > d_ptr

Members


public QCefConfig()

Constructs a CEF config instance.


public QCefConfig(const QCefConfig & other)

Constructs a CEF setting from existing one.


public QCefConfig&operator=(const QCefConfig & other)

Assigns an existing config to current.


public ~QCefConfig()

Destructs the config.


public void addCommandLineSwitch(const QString & smitch)

Adds a switch to the commandline args used to initialize the CEF.

Parameters

  • smitch The switch name

public void addCommandLineSwitchWithValue(const QString & smitch, const QString & v)

Adds a switch with value to the commandline args used to initialize the CEF.

Parameters

  • smitch The swtich name

  • v The switch value


public void setWindowlessRenderingEnabled(const bool enabled)

Sets the flag to enable/disable OSR mode.

Parameters

  • enabled True to enable OSR mode, false to disable

public const QVariant WindowlessRenderingEnabled() const

Gets the OSR mode flag.

Returns

The flag indicates the enable/disable of OSR mode


public void setBrowserSubProcessPath(const QString & path)

Sets the browser subprocess path.

Parameters

  • path The path to the sub process executable

public const QString browserSubProcessPath() const

Gets the browser subprocess path.


public void setResourceDirectoryPath(const QString & path)

Sets the resource directory path.

Parameters

  • path The resource directory path

public const QString resourceDirectoryPath() const

Gets the resource directory path.


public void setLocalesDirectoryPath(const QString & path)

Sets the locales directory path.

Parameters

  • path The locales directory path

public const QString localesDirectoryPath() const

Gets the locales directory path.


public void setLogLevel(const LogLevel lvl)

Sets the log level.

Parameters

  • lvl

public const QCefConfig::LogLevel logLevel() const

Gets the log level.

Returns

The current log level


public void setLocale(const QString & locale)

Sets the locale.

Parameters

  • locale The locale to use. If empty the default locale of "en-US" will be used. This value is ignored on Linux where locale is determined using environment variable parsing with the precedence order: LANGUAGE, LC_ALL, LC_MESSAGES and LANG. Also configurable using the "lang" command-line switch.

public const QString locale() const

Gets the locale.


public void setUserAgent(const QString & agent)

Sets the user agent.

Parameters

  • agent The user agent

public const QString userAgent() const

Gets the user agent.


public void setCachePath(const QString & path)

Sets the cache directory path.

Parameters

  • path The cache path

public const QString cachePath() const

Gets the cache directory path.


public void setUserDataPath(const QString & path)

Sets the user data directory path.

Parameters

  • path The user data directory path

public const QString userDataPath() const

Gets the user data directory path.


public void setBridgeObjectName(const QString & name)

Sets the bridge object name.

Parameters

  • name The bridge object name

The bridge object represents a Javascript object which will be inserted into all browser and frames. This object is designated for communicating between Javascript in web content and native context(C/C++) code. This object is set as an property of window object. That means it can be obtained by calling window.bridgeObject in the Javascript code


public const QString bridgeObjectName() const

Gets the bridge object name.


public void setBackgroundColor(const QColor & color)

Sets the background color of the web page.

Parameters

  • color The color to be set

This only works if the web page has no background color set. The alpha component value will be adjusted to 0 or 255, it means if you pass a value with alpha value in the range of [1, 255], it will be accepted as 255. The default value is qRgba(255, 255, 255, 255)


public const QVariant backgroundColor() const

Gets the background color.


public void setAcceptLanguageList(const QString & languages)

Sets the acceptable language list.

Parameters

  • languages Comma delimited ordered list of language codes without any whitespace that will be used in the "Accept-Language" HTTP header.

public const QString acceptLanguageList() const

Get the acceptable language list.


public void setPersistSessionCookies(bool enabled)

Sets whether to persist session cookie.

Parameters

  • enabled True if to persist session cookie

public const QVariant persistSessionCookies() const

Gets whether to persist session cookie.


public void setPersistUserPreferences(bool enabled)

Sets whether to persist user preferences.

Parameters

  • enabled True if to persist user preferences

public const QVariant persistUserPreferences() const

Gets whether to persist user preferences.


public void setRemoteDebuggingPort(short port)

Sets the remote debugging port.

Parameters

  • port The port to use

CEF supports the remote debugging with Dev Tools in Chrome/Edge. if this value is set then you can debug the web application by accessing http://127.0.0.1:port from Chrome/Edge


public const QVariant remoteDebuggingPort() const

Gets the remote debugging port.


enum LogLevel

Represents the log severity.

ValuesDescriptions
LOGSEVERITY_DEFAULTDefault logging (currently INFO logging)
LOGSEVERITY_VERBOSEVerbose logging.
LOGSEVERITY_DEBUGDEBUG logging.
LOGSEVERITY_INFOINFO logging.
LOGSEVERITY_WARNINGWARNING logging.
LOGSEVERITY_ERRORERROR logging.
LOGSEVERITY_FATALFATAL logging.
LOGSEVERITY_DISABLEDisable logging to file for all messages, and to stderr for messages with severity less than FATAL.

private QScopedPointer< QCefConfigPrivate > d_ptr

- + \ No newline at end of file diff --git a/docs/reference/QCefContext/index.html b/docs/reference/QCefContext/index.html index faa48e65..7b6d18bf 100644 --- a/docs/reference/QCefContext/index.html +++ b/docs/reference/QCefContext/index.html @@ -4,13 +4,13 @@ QCefContext | QCefView - +

class QCefContext

class QCefContext
: public QObject

Represents the CEF context.

Summary

MembersDescriptions
public QCefContext(QCoreApplication * app, int argc, char ** argv, const QCefConfig * config)Constructs the CEF context.
public ~QCefContext()Destructs the CEF context.
public void addLocalFolderResource(const QString & path, const QString & url, int priority)Adds a url mapping item with local web resource directory. This works for all instances created subsequently.
public void addArchiveResource(const QString & path, const QString & url, const QString & password, int priority)Adds a url mapping item with local archive (.zip) file which contains the web resource. This works for all instances created subsequently.
public bool addCookie(const QString & name, const QString & value, const QString & domain, const QString & url)Adds a cookie to the CEF context, this cookie is accessible from all browsers created with this context.
public bool deleteAllCookies()Deletes all cookies from the CEF context.
public bool addCrossOriginWhitelistEntry(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)Adds an entry to the cross-origin access whitelist. For details please refer to: https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L81C23-L81C23.
public bool removeCrossOriginWhitelistEntry(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)Removes an entry from the cross-origin access whitelist. For details please refer to: https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L91C12-L91C12.
public bool clearCrossOriginWhitelistEntry()Removes all entries from the cross-origin access whitelist.
public const QCefConfig*cefConfig() constGets the QCefConfig.
protected bool init(const QCefConfig * config)Initialize the CEF context.
protected void uninit()Uninitialize the CEF context.
private QScopedPointer< QCefContextPrivate > d_ptr
public static QCefContext*instance()Gets the unique default instance.

Members


public QCefContext(QCoreApplication * app, int argc, char ** argv, const QCefConfig * config)

Constructs the CEF context.

Parameters

  • app The application

  • argc The argument count

  • argv The argument list pointer

  • config The QCefConfig instance


public ~QCefContext()

Destructs the CEF context.


public void addLocalFolderResource(const QString & path, const QString & url, int priority)

Adds a url mapping item with local web resource directory. This works for all instances created subsequently.

Parameters

  • path The path to the local resource directory

  • url The url to be mapped to

  • priority The priority


public void addArchiveResource(const QString & path, const QString & url, const QString & password, int priority)

Adds a url mapping item with local archive (.zip) file which contains the web resource. This works for all instances created subsequently.

Parameters

  • path The path to the local archive file

  • url The url to be mapped to

  • password The password of the archive

  • priority The priority


public bool addCookie(const QString & name, const QString & value, const QString & domain, const QString & url)

Adds a cookie to the CEF context, this cookie is accessible from all browsers created with this context.

Parameters

  • name The cookie item name

  • value The cookie item value

  • domain The applicable domain name

  • url The applicable url

Returns

True on success; otherwise false


public bool deleteAllCookies()

Deletes all cookies from the CEF context.

Returns

True on success; otherwise false


public bool addCrossOriginWhitelistEntry(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)

Adds an entry to the cross-origin access whitelist. For details please refer to: https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L81C23-L81C23.

Parameters

  • sourceOrigin The source origin

  • targetSchema The target schema

  • targetDomain The target domain

  • allowTargetSubdomains Whether to allow subdomain or not

Returns

True on success; otherwise false


public bool removeCrossOriginWhitelistEntry(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)

Removes an entry from the cross-origin access whitelist. For details please refer to: https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L91C12-L91C12.

Parameters

  • sourceOrigin The source origin

  • targetSchema The target schema

  • targetDomain The target domain

  • allowTargetSubdomains Whether to allow subdomain or not

Returns

True on success; otherwise false


public bool clearCrossOriginWhitelistEntry()

Removes all entries from the cross-origin access whitelist.


public const QCefConfig*cefConfig() const

Gets the QCefConfig.

Returns

The QCefConfig instance


protected bool init(const QCefConfig * config)

Initialize the CEF context.

Parameters

Returns

True on success; otherwise false


protected void uninit()

Uninitialize the CEF context.


private QScopedPointer< QCefContextPrivate > d_ptr


public static QCefContext*instance()

Gets the unique default instance.

Returns

The default instance

- + \ No newline at end of file diff --git a/docs/reference/QCefDownloadItem/index.html b/docs/reference/QCefDownloadItem/index.html index 8ff51f2c..65648c71 100644 --- a/docs/reference/QCefDownloadItem/index.html +++ b/docs/reference/QCefDownloadItem/index.html @@ -4,13 +4,13 @@ QCefDownloadItem | QCefView - +

class QCefDownloadItem

Represents the download item.

Summary

MembersDescriptions
public ~QCefDownloadItem()Destructs the download item instance.
public void start(const QString & path, bool useDefaultDialog) constStarts to download the item.
public void pause() constPauses the download.
public void resume() constResume the download.
public void cancel() constCancels the download.
public bool isStarted() constGets whether the download is started.
public bool isInProgress() constGets whether the download is in progress.
public bool isComplete() constGets whether the download is complete.
public bool isCanceled() constGets whether the download has been canceled or interrupted.
public qint64 currentSpeed() constGets current download speed.
public int percentComplete() constGets the completion percentage.
public qint64 totalBytes() constGets total number of bytes.
public qint64 receivedBytes() constGets number of received bytes.
public QDateTime startTime() constGets the time that the download started.
public QDateTime endTime() constGets the time that the download ended.
public QString fullPath() constGets the full path to the downloaded or downloading file.
public quint32 id() constGets the unique identifier for this download.
public QString url() constGets the URL.
public QString originalUrl() constGets the original URL before any redirections.
public QString suggestedFileName() constGets the suggested file name.
public QString contentDisposition() constGets the content disposition.
public QString mimeType() constGets the mime type.
private QScopedPointer< QCefDownloadItemPrivate > d_ptr
private QCefDownloadItem(QCefDownloadItem &&) = delete
private QCefDownloadItem&operator=(QCefDownloadItem &&) = delete
private QCefDownloadItem()Constructs a download item instance.

Members


public ~QCefDownloadItem()

Destructs the download item instance.


public void start(const QString & path, bool useDefaultDialog) const

Starts to download the item.

Parameters

  • path The full path name (must include file name) to save the downloaded item

  • useDefaultDialog Whether to use the default 'Save As...' dialog or not

The 'path' parameter only works when 'useDefaultDialog' is set to false. If you set 'useDefaultDialog' to true then you cannot control the initial location of the opened 'Save As...' dialog, it is determined by CEF internal implementation.


public void pause() const

Pauses the download.


public void resume() const

Resume the download.


public void cancel() const

Cancels the download.


public bool isStarted() const

Gets whether the download is started.

Returns


public bool isInProgress() const

Gets whether the download is in progress.

Returns

True if the download is in progress; otherwise false


public bool isComplete() const

Gets whether the download is complete.

Returns

True if the download is complete; otherwise false


public bool isCanceled() const

Gets whether the download has been canceled or interrupted.

Returns

True if the download has been canceled or interrupted; otherwise false


public qint64 currentSpeed() const

Gets current download speed.

Returns

A simple speed estimate in bytes/s


public int percentComplete() const

Gets the completion percentage.

Returns

The rough percent complete or -1 if the receive total size is unknown


public qint64 totalBytes() const

Gets total number of bytes.

Returns

The total number of bytes


public qint64 receivedBytes() const

Gets number of received bytes.

Returns

The number of received bytes


public QDateTime startTime() const

Gets the time that the download started.

Returns

The time that the download started


public QDateTime endTime() const

Gets the time that the download ended.

Returns

The time that the download ended


public QString fullPath() const

Gets the full path to the downloaded or downloading file.

Returns

The full path to the downloaded or downloading file


public quint32 id() const

Gets the unique identifier for this download.

Returns

The unique identifier for this download


public QString url() const

Gets the URL.

Returns

The the URL


public QString originalUrl() const

Gets the original URL before any redirections.

Returns

The original URL before any redirections


public QString suggestedFileName() const

Gets the suggested file name.

Returns

The suggested file name


public QString contentDisposition() const

Gets the content disposition.

Returns

The the content disposition


public QString mimeType() const

Gets the mime type.

Returns

The mime type


private QScopedPointer< QCefDownloadItemPrivate > d_ptr


private QCefDownloadItem(QCefDownloadItem &&) = delete


private QCefDownloadItem&operator=(QCefDownloadItem &&) = delete


private QCefDownloadItem()

Constructs a download item instance.

- + \ No newline at end of file diff --git a/docs/reference/QCefEvent/index.html b/docs/reference/QCefEvent/index.html index c6615d5f..7354cb99 100644 --- a/docs/reference/QCefEvent/index.html +++ b/docs/reference/QCefEvent/index.html @@ -4,13 +4,13 @@ QCefEvent | QCefView - +

class QCefEvent

Represents the event sent from native context(C/C++ code) to the web context(javascript)

Summary

MembersDescriptions
public QCefEvent()Constructs an event instance.
public QCefEvent(const QString & name)Constructs an event instance with name.
public QCefEvent(const QCefEvent & other)Constructs an event instance from existing one.
public QCefEvent&operator=(const QCefEvent & other)Assigns an existing event instance to current.
public ~QCefEvent()Destructs the event instance.
public void setEventName(const QString & name)Sets the event name.
public const QString eventName() constGets the event name.
public void setArguments(const QVariantList & args)Sets the argument list.
public QVariantList & arguments()Gets the argument list.
private QScopedPointer< QCefEventPrivate > d_ptr

Members


public QCefEvent()

Constructs an event instance.


public QCefEvent(const QString & name)

Constructs an event instance with name.

Parameters

  • name The event name

public QCefEvent(const QCefEvent & other)

Constructs an event instance from existing one.

Parameters

  • other The other event instance

public QCefEvent&operator=(const QCefEvent & other)

Assigns an existing event instance to current.

Parameters

  • other The other event instance

public ~QCefEvent()

Destructs the event instance.


public void setEventName(const QString & name)

Sets the event name.

Parameters

  • name The name to be set

public const QString eventName() const

Gets the event name.

Returns

The event name


public void setArguments(const QVariantList & args)

Sets the argument list.

Parameters

  • args The argument list

public QVariantList & arguments()

Gets the argument list.

Returns

The argument list


private QScopedPointer< QCefEventPrivate > d_ptr

- + \ No newline at end of file diff --git a/docs/reference/QCefQuery/index.html b/docs/reference/QCefQuery/index.html index d913ef06..ef31ef87 100644 --- a/docs/reference/QCefQuery/index.html +++ b/docs/reference/QCefQuery/index.html @@ -4,13 +4,13 @@ QCefQuery | QCefView - +

class QCefQuery

Represents the query request sent from the web content(Javascript)

Summary

MembersDescriptions
public QCefQuery()Constructs a query instance.
public QCefQuery(const QString & req, const int64_t query)Constructs a query instance with request context and query id.
public QCefQuery(const QCefQuery & other)Constructs a query instance from existing one.
public QCefQuery&operator=(const QCefQuery & other)Assigns an existing query instance to current.
public ~QCefQuery()Destructs a query instance.
public const QString request() constGets the query content.
public const qint64 id() constGets the query id.
public const QString response() constGets the response content string.
public const bool result() constGets the response result.
public const int error() constGets the response error.
public void setResponseResult(bool success, const QString & response, int error) constSets the response.
private QScopedPointer< QCefQueryPrivate > d_ptr

Members


public QCefQuery()

Constructs a query instance.


public QCefQuery(const QString & req, const int64_t query)

Constructs a query instance with request context and query id.

Parameters

  • req The request context

  • query The query id


public QCefQuery(const QCefQuery & other)

Constructs a query instance from existing one.

Parameters

  • other The other query instance

public QCefQuery&operator=(const QCefQuery & other)

Assigns an existing query instance to current.

Parameters

  • other The other query instance

public ~QCefQuery()

Destructs a query instance.


public const QString request() const

Gets the query content.

Returns

The content string


public const qint64 id() const

Gets the query id.

Returns

The query id


public const QString response() const

Gets the response content string.

Returns

The response content string


public const bool result() const

Gets the response result.

Returns

The respone result


public const int error() const

Gets the response error.

Returns

The response error


public void setResponseResult(bool success, const QString & response, int error) const

Sets the response.

Parameters

  • success True if the query is successful; otherwise false

  • response The response content string

  • error The response error


private QScopedPointer< QCefQueryPrivate > d_ptr

- + \ No newline at end of file diff --git a/docs/reference/QCefSetting/index.html b/docs/reference/QCefSetting/index.html index 455fc1f4..ed5101ef 100644 --- a/docs/reference/QCefSetting/index.html +++ b/docs/reference/QCefSetting/index.html @@ -4,13 +4,13 @@ QCefSetting | QCefView - +

class QCefSetting

Represents the settings for individual browser.

Summary

MembersDescriptions
public QCefSetting()Constructs the QCefSetting instance.
public QCefSetting(const QCefSetting & other)Constructs the QCefSetting instance from existing one.
public QCefSetting&operator=(const QCefSetting & other)Assigns the existing QCefSetting instance to current.
public ~QCefSetting()Destructs the instance.
public void setStandardFontFamily(const QString value)Sets the standard font family.
public const QString standardFontFamily() constGets the standard font family.
public void setFixedFontFamily(const QString & value)Sets the fixed font family.
public const QString fixedFontFamily() constGets the fixed font family.
public void setSerifFontFamily(const QString & value)Sets the serif font family.
public const QString serifFontFamily() constGets the serif font family.
public void setSansSerifFontFamily(const QString & value)Sets the sans serif font family.
public const QString sansSerifFontFamily() constGets the sans serif font family.
public void setCursiveFontFamily(const QString & value)Sets the cursive font family.
public const QString cursiveFontFamily() constGets the cursive font family.
public void setFantasyFontFamily(const QString & value)Sets the fantasy font family.
public const QString fantasyFontFamily() constGets the fantasy font family.
public void setDefaultEncoding(const QString & value)Sets the default encoding.
public const QString defaultEncoding() constGets the default encoding.
public void setAcceptLanguageList(const QString & value)Sets the acceptable language list.
public const QString acceptLanguageList() constGets the acceptable language list.
public void setWindowlessFrameRate(const int value)Sets the frame rate in window less mode.
public const QVariant windowlessFrameRate() constGets the frame rate in window less mode.
public void setDefaultFontSize(const int value)Sets the default font size.
public const QVariant defaultFontSize() constGets the default font size.
public void setDefaultFixedFontSize(const int value)Sets the default fixed font size.
public const QVariant defaultFixedFontSize() constGets the default fixed font size.
public void setMinimumFontSize(const int value)Sets the minimum font size.
public const QVariant minimumFontSize() constGets the minimum font size.
public void setMinimumLogicalFontSize(const int value)Sets the minimum logical font size.
public const QVariant minimumLogicalFontSize() constGets the minimum logical font size.
public void setRemoteFonts(const bool value)Sets to enable or disable remote fonts.
public const QVariant remoteFonts() constGets whether to enable or disable the remote fonts.
public void setJavascript(const bool value)Sets to enable or disable Javascript.
public const QVariant javascript() constGets whether to enable or disable Javascript.
public void setJavascriptCloseWindows(const bool value)Sets to enable or disable the permission of closing window from Javascript.
public const QVariant javascriptCloseWindows() constGets whether to enable or disable the permission of closing window from Javascript.
public void setJavascriptAccessClipboard(const bool value)Sets to enable or disable the permission of accessing clipboard from Javascript.
public const QVariant javascriptAccessClipboard() constGets whether to enable or disable the permission of accessing clipboard from Javascript.
public void setJavascriptDomPaste(const bool value)Sets to enable or disable the permission of pasting DOM in Javascript.
public const QVariant javascriptDomPaste() constGets whether to enable or disable the permission of pasting DOM in Javascript.
public void setPlugins(const bool value)Sets to enable or disable plugins.
public const QVariant plugins() constGets whether to enable or disable plugins.
public void setImageLoading(const bool value)Sets to enable or disable the permission of loading images.
public const QVariant imageLoading() constGets whether to enable or disable the permission of loading images.
public void setImageShrinkStandaloneToFit(const bool value)Sets to enable or disable the shrinking image standalone to fit.
public const QVariant imageShrinkStandaloneToFit() constGets whether to enable or disable the shrinking image standalone to fit.
public void setTextAreaResize(const bool value)Sets to enable or disable the resizing of text area.
public const QVariant textAreaResize() constGets whether to enable or disable the resizing of text area.
public void setTabToLinks(const bool value)Sets to enable or disable tab to links.
public const QVariant tabToLinks() constGets whether to enable or disable tab to links.
public void setLocalStorage(const bool value)Sets to enable or disable local storage.
public const QVariant localStorage() constGets whether to enable or disable local storage.
public void setDatabases(const bool value)Sets to enable or disable database.
public const QVariant databases() constGets whether to enable or disable database.
public void setWebGL(const bool value)Sets to enable or disable webGL.
public const QVariant webGL() constGets whether to enable or disable webGL.
public void setBackgroundColor(const QColor & value)Sets the background color.
public const QVariant backgroundColor() constGets the background color.
private QScopedPointer< QCefSettingPrivate > d_ptr

Members


public QCefSetting()

Constructs the QCefSetting instance.


public QCefSetting(const QCefSetting & other)

Constructs the QCefSetting instance from existing one.

Parameters


public QCefSetting&operator=(const QCefSetting & other)

Assigns the existing QCefSetting instance to current.

Parameters

  • other

public ~QCefSetting()

Destructs the instance.


public void setStandardFontFamily(const QString value)

Sets the standard font family.

Parameters

  • value The font family

public const QString standardFontFamily() const

Gets the standard font family.

Returns

The font family


public void setFixedFontFamily(const QString & value)

Sets the fixed font family.

Parameters

  • value The font family

public const QString fixedFontFamily() const

Gets the fixed font family.

Returns

The font family


public void setSerifFontFamily(const QString & value)

Sets the serif font family.

Parameters

  • value The font family

public const QString serifFontFamily() const

Gets the serif font family.

Returns

The font family


public void setSansSerifFontFamily(const QString & value)

Sets the sans serif font family.

Parameters

  • value The font family

public const QString sansSerifFontFamily() const

Gets the sans serif font family.

Returns

The font family


public void setCursiveFontFamily(const QString & value)

Sets the cursive font family.

Parameters

  • value The font family

public const QString cursiveFontFamily() const

Gets the cursive font family.

Returns

The font family


public void setFantasyFontFamily(const QString & value)

Sets the fantasy font family.

Parameters

  • value The font family

public const QString fantasyFontFamily() const

Gets the fantasy font family.

Returns

The font family


public void setDefaultEncoding(const QString & value)

Sets the default encoding.

Parameters

  • value The encoding name

public const QString defaultEncoding() const

Gets the default encoding.

Returns

The encoding name


public void setAcceptLanguageList(const QString & value)

Sets the acceptable language list.

Parameters

  • value The acceptable languate list

public const QString acceptLanguageList() const

Gets the acceptable language list.

Returns

The acceptable languate list


public void setWindowlessFrameRate(const int value)

Sets the frame rate in window less mode.

Parameters

  • value The frame rate

public const QVariant windowlessFrameRate() const

Gets the frame rate in window less mode.

Returns

The frame rate


public void setDefaultFontSize(const int value)

Sets the default font size.

Parameters

  • value The font size

public const QVariant defaultFontSize() const

Gets the default font size.

Returns

The font size


public void setDefaultFixedFontSize(const int value)

Sets the default fixed font size.

Parameters

  • value The font size

public const QVariant defaultFixedFontSize() const

Gets the default fixed font size.

Returns

The font size


public void setMinimumFontSize(const int value)

Sets the minimum font size.

Parameters

  • value The font size

public const QVariant minimumFontSize() const

Gets the minimum font size.

Returns

The font size


public void setMinimumLogicalFontSize(const int value)

Sets the minimum logical font size.

Parameters

  • value The font size

public const QVariant minimumLogicalFontSize() const

Gets the minimum logical font size.

Returns

The font size


public void setRemoteFonts(const bool value)

Sets to enable or disable remote fonts.

Parameters

  • value True to enable; false to disable

public const QVariant remoteFonts() const

Gets whether to enable or disable the remote fonts.

Returns

True to enable; false to disable


public void setJavascript(const bool value)

Sets to enable or disable Javascript.

Parameters

  • value True to enable; false to disable

public const QVariant javascript() const

Gets whether to enable or disable Javascript.

Returns

True to enable; false to disable


public void setJavascriptCloseWindows(const bool value)

Sets to enable or disable the permission of closing window from Javascript.

Parameters

  • value True to enable; false to disable

public const QVariant javascriptCloseWindows() const

Gets whether to enable or disable the permission of closing window from Javascript.

Returns

True to enable; false to disable


public void setJavascriptAccessClipboard(const bool value)

Sets to enable or disable the permission of accessing clipboard from Javascript.

Parameters

  • value True to enable; false to disable

public const QVariant javascriptAccessClipboard() const

Gets whether to enable or disable the permission of accessing clipboard from Javascript.

Returns

True to enable; false to disable


public void setJavascriptDomPaste(const bool value)

Sets to enable or disable the permission of pasting DOM in Javascript.

Parameters

  • value True to enable; false to disable

public const QVariant javascriptDomPaste() const

Gets whether to enable or disable the permission of pasting DOM in Javascript.

Returns

True to enable; false to disable


public void setPlugins(const bool value)

Sets to enable or disable plugins.

Parameters

  • value True to enable; false to disable

public const QVariant plugins() const

Gets whether to enable or disable plugins.

Returns

True to enable; false to disable


public void setImageLoading(const bool value)

Sets to enable or disable the permission of loading images.

Parameters

  • value True to enable; false to disable

public const QVariant imageLoading() const

Gets whether to enable or disable the permission of loading images.

Returns

True to enable; false to disable


public void setImageShrinkStandaloneToFit(const bool value)

Sets to enable or disable the shrinking image standalone to fit.

Parameters

  • value True to enable; false to disable

public const QVariant imageShrinkStandaloneToFit() const

Gets whether to enable or disable the shrinking image standalone to fit.

Returns

True to enable; false to disable


public void setTextAreaResize(const bool value)

Sets to enable or disable the resizing of text area.

Parameters

  • value True to enable; false to disable

public const QVariant textAreaResize() const

Gets whether to enable or disable the resizing of text area.

Returns

True to enable; false to disable


public void setTabToLinks(const bool value)

Sets to enable or disable tab to links.

Parameters

  • value True to enable; false to disable

public const QVariant tabToLinks() const

Gets whether to enable or disable tab to links.

Returns

True to enable; false to disable


public void setLocalStorage(const bool value)

Sets to enable or disable local storage.

Parameters

  • value True to enable; false to disable

public const QVariant localStorage() const

Gets whether to enable or disable local storage.

Returns

True to enable; false to disable


public void setDatabases(const bool value)

Sets to enable or disable database.

Parameters

  • value True to enable; false to disable

public const QVariant databases() const

Gets whether to enable or disable database.

Returns

True to enable; false to disable


public void setWebGL(const bool value)

Sets to enable or disable webGL.

Parameters

  • value True to enable; false to disable

public const QVariant webGL() const

Gets whether to enable or disable webGL.

Returns

True to enable; false to disable


public void setBackgroundColor(const QColor & value)

Sets the background color.

Parameters

  • value The color

This only works if the web page has no background color set. The alpha component value will be adjusted to 0 or 255, it means if you pass a value with alpha value in the range of [1, 255], it will be accepted as 255. The default value is inherited from QCefConfig::backgroundColor()


public const QVariant backgroundColor() const

Gets the background color.

Returns

The color


private QScopedPointer< QCefSettingPrivate > d_ptr

- + \ No newline at end of file diff --git a/docs/reference/QCefView/index.html b/docs/reference/QCefView/index.html index 75cf5dfb..658257e8 100644 --- a/docs/reference/QCefView/index.html +++ b/docs/reference/QCefView/index.html @@ -4,13 +4,13 @@ QCefView | QCefView - +

class QCefView

class QCefView
: public QWidget

Represents the CEF browser view.

Summary

MembersDescriptions
public QCefView(const QString url, const QCefSetting * setting, QWidget * parent, Qt::WindowFlags f)Constructs a QCefView instance.
public QCefView(QWidget * parent, Qt::WindowFlags f)Constructs a QCefView instance.
public ~QCefView()Destructs the QCefView instance.
public void addLocalFolderResource(const QString & path, const QString & url, int priority)Adds a url mapping item with local web resource directory.
public void addArchiveResource(const QString & path, const QString & url, const QString & password, int priority)Adds a url mapping item with local archive (.zip) file which contains the web resource.
public int browserId()Gets the browser id.
public bool isPopup()Gets whether the browser is created as popup browser.
public void navigateToString(const QString & content)Navigates to the content.
public void navigateToUrl(const QString & url)Navigates to the URL.
public bool browserCanGoBack()Checks whether the browser can go back.
public bool browserCanGoForward()Checks whether the browser can go forward.
public void browserGoBack()Requires the browser to go back.
public void browserGoForward()Requires the browser to go forward.
public bool browserIsLoading()Checks whether the browser is loading.
public void browserReload()Requires the browser to reload.
public void browserStopLoad()Requires the browser to stop load.
public bool triggerEvent(const QCefEvent & event)Triggers the event for main frame.
public bool triggerEvent(const QCefEvent & event, qint64 frameId)Triggers the event for specified frame.
public bool broadcastEvent(const QCefEvent & event)Broad cast the event for all frames.
public bool responseQCefQuery(const QCefQuery & query)Response the QCefQuery request.
public bool executeJavascript(qint64 frameId, const QString & code, const QString & url)Executes javascript code in specified frame, this method does not report the result of the javascript. To get the result of the javascript execution use executeJavascriptWithResult
public bool executeJavascriptWithResult(qint64 frameId, const QString & code, const QString & url, qint64 context)Executes javascript code in specified frame and the result will be reported through reportJavascriptResult signal.
public bool setPreference(const QString & name, const QVariant & value, const QString & error)Sets the preference for this browser.
public void setDisablePopupContextMenu(bool disable)Sets whether to disable the context menu for popup browser.
public bool isPopupContextMenuDisabled()Gets whether to disable the context menu for popup browser.
public bool hasDevTools()Detects whether this browser has a devtools opened.
public void showDevTools()Opens the devtools dialog.
public void closeDevTools()Closes the devtools dialog.
public void setEnableDragAndDrop(bool enable)Sets whether to enable drag and drop.
public bool isDragAndDropEnabled() constGets whether to enable drag and drop.
public void setFocus(Qt::FocusReason reason)Please refer to QWidget::setFocus.
public QVariant inputMethodQuery(Qt::InputMethodQuery query) constPlease refer to QWidget::inputMethodQuery.
protected virtual bool onBeforePopup(qint64 frameId, const QString & targetUrl, const QString & targetFrameName, QCefView::CefWindowOpenDispositiontargetDisposition, QRect & rect,QCefSetting & settings)Gets called before the popup browser created.
protected virtual void onNewDownloadItem(const QSharedPointer< QCefDownloadItem > & item, const QString & suggestedName)Gets called on new download item was required. Keep reference to the download item and call QCefDownloadItem::start method to allow and start the download, Ignore the download item to disallow the download.
protected virtual void onUpdateDownloadItem(const QSharedPointer< QCefDownloadItem > & item)Gets called on download item updated. To get this method called QCefDownloadItem::start method must be called in newDownloadItem method.
protected void paintEvent(QPaintEvent * event)Please refer to QWidget::paintEvent.
protected void inputMethodEvent(QInputMethodEvent * event)Please refer to QWidget::inputMethodEvent.
protected void showEvent(QShowEvent * event)Please refer to QWidget::showEvent.
protected void hideEvent(QHideEvent * event)Please refer to QWidget::hideEvent.
protected void focusInEvent(QFocusEvent * event)Please refer to QWidget::focusInEvent.
protected void focusOutEvent(QFocusEvent * event)Please refer to QWidget::focusOutEvent.
protected void resizeEvent(QResizeEvent * event)Please refer to QWidget::resizeEvent.
protected void keyPressEvent(QKeyEvent * event)Please refer to QWidget::keyPressEvent.
protected void keyReleaseEvent(QKeyEvent * event)Please refer to QWidget::keyReleaseEvent.
protected void mouseMoveEvent(QMouseEvent * event)Please refer to QWidget::mouseMoveEvent.
protected void mousePressEvent(QMouseEvent * event)Please refer to QWidget::mousePressEvent.
protected void mouseReleaseEvent(QMouseEvent * event)Please refer to QWidget::mouseReleaseEvent.
protected void wheelEvent(QWheelEvent * event)Please refer to QWidget::wheelEvent.
protected void contextMenuEvent(QContextMenuEvent * event)Please refer to QWidget::contextMenuEvent.
{signal} public void loadingStateChanged(int browserId, bool isLoading, bool canGoBack, bool canGoForward)Gets called on loading state changed.
{signal} public void loadStart(int browserId, qint64 frameId, bool isMainFrame, int transitionType)Gets called on loading starts.
{signal} public void loadEnd(int browserId, qint64 frameId, bool isMainFrame, int httpStatusCode)Gets called on loading ends.
{signal} public void loadError(int browserId, qint64 frameId, bool isMainFrame, int errorCode, const QString & errorMsg, const QString & failedUrl)Gets called on loading failed due to error.
{signal} public void draggableRegionChanged(const QRegion & draggableRegion, const QRegion & nonDraggableRegion)Gets called on draggable region changed.
{signal} public void addressChanged(qint64 frameId, const QString & url)Gets called on the address changed.
{signal} public void titleChanged(const QString & title)Gets called on title changed.
{signal} public void faviconURLChanged(const QStringList & urls)Gets called on favicon url changed.
{signal} public void faviconChanged(const QIcon & icon)Gets called on favicon changed.
{signal} public void fullscreenModeChanged(bool fullscreen)Gets called on fullscreen mode changed.
{signal} public void statusMessage(const QString & message)Gets called on status message changed.
{signal} public void consoleMessage(const QString & message, int level)Gets called on console message from the web content.
{signal} public void loadingProgressChanged(double progress)Gets called on loading progress changed.
{signal} public void cefQueryRequest(int browserId, qint64 frameId, const QCefQuery & query)Gets called on new QCefQuery request.
{signal} public void invokeMethod(int browserId, qint64 frameId, const QString & method, const QVariantList & arguments)Gets called on invoking method request from web content(Javascript)
{signal} public void reportJavascriptResult(int browserId, qint64 frameId, qint64 context, const QVariant & result)Gets called on the result of the javascript executed with executeJavascriptWithResult returned.
{signal} public void nativeBrowserCreated(QWindow * window)Gets called after the native browser window created. This slot does not work for OSR mode.
{signal} public void popupCreated(QCefView * popup)Gets called right after the popup browser was created.
{slot} public inline void setFocus()
enum CefWindowOpenDispositionRepresents the CEF popup windows open disposition.
private QScopedPointer< QCefViewPrivate > d_ptr

Members


public QCefView(const QString url, const QCefSetting * setting, QWidget * parent, Qt::WindowFlags f)

Constructs a QCefView instance.

Parameters

  • url The target url

  • setting The QCefSetting instance

  • parent The parent

  • f The Qt WindowFlags


public QCefView(QWidget * parent, Qt::WindowFlags f)

Constructs a QCefView instance.

Parameters

  • parent The parent

  • f The Qt WindowFlags


public ~QCefView()

Destructs the QCefView instance.


public void addLocalFolderResource(const QString & path, const QString & url, int priority)

Adds a url mapping item with local web resource directory.

Parameters

  • path The path to the local resource directory

  • url The url to be mapped to

  • priority The priority


public void addArchiveResource(const QString & path, const QString & url, const QString & password, int priority)

Adds a url mapping item with local archive (.zip) file which contains the web resource.

Parameters

  • path The path to the local archive file

  • url The url to be mapped to

  • password The password of the archive

  • priority The priority


public int browserId()

Gets the browser id.

Returns

The browser id


public bool isPopup()

Gets whether the browser is created as popup browser.

Returns

True if it is popup browser; otherwise false


public void navigateToString(const QString & content)

Navigates to the content.

Parameters

  • content The content

public void navigateToUrl(const QString & url)

Navigates to the URL.

Parameters

  • url The url

public bool browserCanGoBack()

Checks whether the browser can go back.

Returns

True if can; otherwise false


public bool browserCanGoForward()

Checks whether the browser can go forward.

Returns

True if can; otherwise false


public void browserGoBack()

Requires the browser to go back.


public void browserGoForward()

Requires the browser to go forward.


public bool browserIsLoading()

Checks whether the browser is loading.

Returns

True if it is loading; otherwise false


public void browserReload()

Requires the browser to reload.


public void browserStopLoad()

Requires the browser to stop load.


public bool triggerEvent(const QCefEvent & event)

Triggers the event for main frame.

Parameters

Returns

True on successful; otherwise false


public bool triggerEvent(const QCefEvent & event, qint64 frameId)

Triggers the event for specified frame.

Parameters

  • event The QCefEvent instance

  • frameId The frame id

Returns

True on successful; otherwise false


public bool broadcastEvent(const QCefEvent & event)

Broad cast the event for all frames.

Parameters

Returns

True on successful; otherwise false


public bool responseQCefQuery(const QCefQuery & query)

Response the QCefQuery request.

Parameters

  • query The query instance

Returns

True on successful; otherwise false


public bool executeJavascript(qint64 frameId, const QString & code, const QString & url)

Executes javascript code in specified frame, this method does not report the result of the javascript. To get the result of the javascript execution use executeJavascriptWithResult

Parameters

  • frameId The frame id

  • code The javascript code

  • url The URL where the script in question can be found, if any. The renderer may request this URL to show the developer the source of the error

Returns

True on successful; otherwise false


public bool executeJavascriptWithResult(qint64 frameId, const QString & code, const QString & url, qint64 context)

Executes javascript code in specified frame and the result will be reported through reportJavascriptResult signal.

Parameters

  • frameId The frame id

  • code The javascript code

  • url The URL where the script in question can be found, if any. The renderer may request this URL to show the developer the source of the error

  • context The context used to identify the one execution

Returns

True on successful; otherwise false


public bool setPreference(const QString & name, const QVariant & value, const QString & error)

Sets the preference for this browser.

Parameters

  • name The preference name

  • value The preference value, if this value is QVariant::UnknownType or QVariant::Invalid, the preference will be restored to default value

  • error The error message populated on failure

Returns

True on successful; otherwise false


public void setDisablePopupContextMenu(bool disable)

Sets whether to disable the context menu for popup browser.

Parameters

  • disable True to disable; otherwise false

public bool isPopupContextMenuDisabled()

Gets whether to disable the context menu for popup browser.

Returns

True to disable; otherwise false


public bool hasDevTools()

Detects whether this browser has a devtools opened.

Returns

True if opend already; otherwise false


public void showDevTools()

Opens the devtools dialog.


public void closeDevTools()

Closes the devtools dialog.


public void setEnableDragAndDrop(bool enable)

Sets whether to enable drag and drop.

Parameters

  • enable True to enable; otherwise false

This function does not work for OSR mode. There is a problem, when dragging a file to a non dragging area, the content of the file will be displayed. You need to solve the problem yourself.


public bool isDragAndDropEnabled() const

Gets whether to enable drag and drop.

Returns

True to enable; otherwise false


public void setFocus(Qt::FocusReason reason)

Please refer to QWidget::setFocus.


public QVariant inputMethodQuery(Qt::InputMethodQuery query) const

Please refer to QWidget::inputMethodQuery.


protected virtual bool onBeforePopup(qint64 frameId, const QString & targetUrl, const QString & targetFrameName, QCefView::CefWindowOpenDispositiontargetDisposition, QRect & rect,QCefSetting & settings)

Gets called before the popup browser created.

Parameters

  • frameId The source frame id

  • targetUrl The target URL

  • targetFrameName The target name

  • targetDisposition Target window open method

  • rect Rect to be used for the popup

  • settings Settings to be used for the popup

Returns

True to cancel the popup; false to allow


protected virtual void onNewDownloadItem(const QSharedPointer< QCefDownloadItem > & item, const QString & suggestedName)

Gets called on new download item was required. Keep reference to the download item and call QCefDownloadItem::start method to allow and start the download, Ignore the download item to disallow the download.

Parameters

  • item The new download item

  • suggestedName The new suggested name


protected virtual void onUpdateDownloadItem(const QSharedPointer< QCefDownloadItem > & item)

Gets called on download item updated. To get this method called QCefDownloadItem::start method must be called in newDownloadItem method.

Parameters

  • item The download item

protected void paintEvent(QPaintEvent * event)

Please refer to QWidget::paintEvent.


protected void inputMethodEvent(QInputMethodEvent * event)

Please refer to QWidget::inputMethodEvent.


protected void showEvent(QShowEvent * event)

Please refer to QWidget::showEvent.


protected void hideEvent(QHideEvent * event)

Please refer to QWidget::hideEvent.


protected void focusInEvent(QFocusEvent * event)

Please refer to QWidget::focusInEvent.


protected void focusOutEvent(QFocusEvent * event)

Please refer to QWidget::focusOutEvent.


protected void resizeEvent(QResizeEvent * event)

Please refer to QWidget::resizeEvent.


protected void keyPressEvent(QKeyEvent * event)

Please refer to QWidget::keyPressEvent.


protected void keyReleaseEvent(QKeyEvent * event)

Please refer to QWidget::keyReleaseEvent.


protected void mouseMoveEvent(QMouseEvent * event)

Please refer to QWidget::mouseMoveEvent.


protected void mousePressEvent(QMouseEvent * event)

Please refer to QWidget::mousePressEvent.


protected void mouseReleaseEvent(QMouseEvent * event)

Please refer to QWidget::mouseReleaseEvent.


protected void wheelEvent(QWheelEvent * event)

Please refer to QWidget::wheelEvent.


protected void contextMenuEvent(QContextMenuEvent * event)

Please refer to QWidget::contextMenuEvent.


{signal} public void loadingStateChanged(int browserId, bool isLoading, bool canGoBack, bool canGoForward)

Gets called on loading state changed.

Parameters

  • browserId Indicates the browser id

  • isLoading Indicates the browser is loading

  • canGoBack Indicates the browser can go back

  • canGoForward Indicates the browser can go forward


{signal} public void loadStart(int browserId, qint64 frameId, bool isMainFrame, int transitionType)

Gets called on loading starts.

Parameters

  • browserId Indicates the browser id

  • frameId Indicates the frame id

  • isMainFrame Indicates the whether this is the main frame

  • transitionType transition type


{signal} public void loadEnd(int browserId, qint64 frameId, bool isMainFrame, int httpStatusCode)

Gets called on loading ends.

Parameters

  • browserId Indicates the browser id

  • frameId Indicates the frame id

  • isMainFrame Indicates the whether this is the main frame

  • httpStatusCode The HTTP status code


{signal} public void loadError(int browserId, qint64 frameId, bool isMainFrame, int errorCode, const QString & errorMsg, const QString & failedUrl)

Gets called on loading failed due to error.

Parameters

  • browserId Indicates the browser id

  • frameId Indicates the frame id

  • isMainFrame Indicates the whether this is the main frame

  • errorCode The error code

  • errorMsg The error message

  • failedUrl The url caused the failure


{signal} public void draggableRegionChanged(const QRegion & draggableRegion, const QRegion & nonDraggableRegion)

Gets called on draggable region changed.

Parameters

  • draggableRegion The new draggable region

  • nonDraggableRegion The new non-draggable region


{signal} public void addressChanged(qint64 frameId, const QString & url)

Gets called on the address changed.

Parameters

  • frameId The frame id

  • url The address


{signal} public void titleChanged(const QString & title)

Gets called on title changed.

Parameters

  • title The title

{signal} public void faviconURLChanged(const QStringList & urls)

Gets called on favicon url changed.

Parameters

  • urls The urls

{signal} public void faviconChanged(const QIcon & icon)

Gets called on favicon changed.

Parameters

  • icon The icon

{signal} public void fullscreenModeChanged(bool fullscreen)

Gets called on fullscreen mode changed.

Parameters

  • fullscreen The current fullscreen mode

{signal} public void statusMessage(const QString & message)

Gets called on status message changed.

Parameters

  • message The status message

{signal} public void consoleMessage(const QString & message, int level)

Gets called on console message from the web content.

Parameters

  • message The message

  • level The level


{signal} public void loadingProgressChanged(double progress)

Gets called on loading progress changed.

Parameters

  • progress Current progress

{signal} public void cefQueryRequest(int browserId, qint64 frameId, const QCefQuery & query)

Gets called on new QCefQuery request.

Parameters

  • browserId The browser id

  • frameId The frame id

  • query The query request


{signal} public void invokeMethod(int browserId, qint64 frameId, const QString & method, const QVariantList & arguments)

Gets called on invoking method request from web content(Javascript)

Parameters

  • browserId The browser id

  • frameId The frame id

  • method The method name

  • arguments The arguments list


{signal} public void reportJavascriptResult(int browserId, qint64 frameId, qint64 context, const QVariant & result)

Gets called on the result of the javascript executed with executeJavascriptWithResult returned.

Parameters

  • browserId The browser id

  • frameId The frame id

  • context The context

  • result The result


{signal} public void nativeBrowserCreated(QWindow * window)

Gets called after the native browser window created. This slot does not work for OSR mode.

Parameters

  • window The native browser windows

{signal} public void popupCreated(QCefView * popup)

Gets called right after the popup browser was created.

Parameters

  • popup The new created popup QCefView instance

The lifecycle of the popup browser is managed by the owner of the popup browser, thus do not try to hold the popup browser instance. If you need to implement browser tab, you should override the onBeforePopup method and create your own QCefView browser instance then you can manipulate the created one as whatever you want.


{slot} public inline void setFocus()


enum CefWindowOpenDisposition

Represents the CEF popup windows open disposition.

ValuesDescriptions
CefWindowOpenDispositionUnknown
CefWindowOpenDispositionCurrentTab
CefWindowOpenDispositionSingletonTab
CefWindowOpenDispositionNewForeGroundTab
CefWindowOpenDispositionNewBackgroundTab
CefWindowOpenDispositionNewPopup
CefWindowOpenDispositionNewWindow
CefWindowOpenDispositionSaveToDisk
CefWindowOpenDispositionOffTheRecord
CefWindowOpenDispositionIgnoreAction

private QScopedPointer< QCefViewPrivate > d_ptr

- + \ No newline at end of file diff --git a/docs/reference/WebAPIs/index.html b/docs/reference/WebAPIs/index.html index 5a1be748..db1abfc6 100644 --- a/docs/reference/WebAPIs/index.html +++ b/docs/reference/WebAPIs/index.html @@ -4,13 +4,13 @@ Web APIs | QCefView - +

Web APIs

object window.CefViewClient

QCefView added the Javascript bridge object CefViewClient to window object for all browsers frames, with this bridge object you can perform communication between native and web context at anytime

Summary

MembersDescriptions
addEventListener(name, listener)Adds a listener for the event with specified name
removeEventListener(name, listener)Removes the listener for the event with specified name
invokeMethod(name, ...args)Invokes a native method with the specified name and arguments

Members


addEventListener(name, listener)

Adds a listener for the event with specified name

Parameters
  • name The event name
  • listener The listener callback function

removeEventListener(name, listener)

Removes the listener for the event with specified name

Parameters
  • name The event name
  • listener The listener callback function

invokeMethod(name, ...args)

Invokes a native method with the specified name and arguments

Parameters
  • name The method name
  • ..args The arguments for the method

object window

QCefView added some extra methods to the window object for all browsers frames, with these methods you can perform communication between native and web context

Summary

MembersDescriptions
window.CefViewQuery(query)Sends a cef query request to the native context
window.CefViewQueryCancel(id)Cancels the query request with the specified id

Members


window.CefViewQuery(query)

Sends a cef query request to the native context

Parameters
  • query The query object
Returns
  • The query id

window.CefViewQueryCancel(id)

Cancels the query request with the specified id

Parameters
  • id The query id
- + \ No newline at end of file diff --git a/docs/reference/index.html b/docs/reference/index.html index abed3a2d..3d883b39 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -4,13 +4,13 @@ Reference | QCefView - +

Reference

MembersDescriptions
class QCefConfigRepresents the CEF setting. For more details please refer to CEF General Usage
class QCefContextRepresents the CEF context
class QCefDownloadItemRepresents the download item
class QCefEventRepresents the event sent from native context(C/C++ code) to the web context(javascript)
class QCefQueryRepresents the query request sent from the web content(Javascript)
class QCefSettingRepresents the settings for individual browser
class QCefViewRepresents the CEF browser view
- + \ No newline at end of file diff --git a/index.html b/index.html index f5a193ac..afc3c5d2 100644 --- a/index.html +++ b/index.html @@ -4,13 +4,13 @@ QCefView | QCefView - +

QCefView

A QWidget-based Web View Component Integrated with CEF

[object Object]

Easy to Use

QCefView was designed from the ground up to be easily used to leverage the powerful capabilities of lib CEF with Qt framework.

[object Object]

Cross-Platform Support

QCefView was also implemented as a cross-platform component which works perfectly on Windows, macOS and Linux.

[object Object]

Powered by Qt & CEF

QCefView encapsulated the lib CEF without CEF stuff exposed.Use QCefView like any other widgets in Qt framework to build hybrid application.

- + \ No newline at end of file