From cc75e3601bf734c79fb7cfd3115d86f3db8ae415 Mon Sep 17 00:00:00 2001 From: CefView Date: Sat, 26 Aug 2023 01:43:18 +0000 Subject: [PATCH] Update from https://github.com/CefView/QCefViewDoc/commit/a2a2bdacbda3d0279a05a3d25909d509912d2fcc --- 404.html | 4 ++-- assets/js/895d7fdb.4e74906b.js | 1 - assets/js/895d7fdb.8406e34b.js | 1 + .../{runtime~main.da73cb05.js => runtime~main.3a23efae.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 | 4 ++-- docs/intros/change-cef-ver/index.html | 4 ++-- docs/intros/index.html | 4 ++-- docs/reference/QCefConfig/index.html | 4 ++-- docs/reference/QCefContext/index.html | 6 +++--- 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 ++-- zh/404.html | 4 ++-- zh/assets/js/34ec668e.9df8f6e7.js | 1 - zh/assets/js/34ec668e.c3dd3739.js | 1 + zh/assets/js/4c071278.d53a07de.js | 1 + zh/assets/js/4c071278.e7569fae.js | 1 - .../{runtime~main.3a8813c3.js => runtime~main.8d7d71fb.js} | 2 +- zh/docs/guide/CefviewQuery/index.html | 4 ++-- zh/docs/guide/FirstProject/index.html | 4 ++-- zh/docs/guide/Interoperability/index.html | 4 ++-- zh/docs/guide/LoadWebResource/index.html | 4 ++-- zh/docs/guide/index.html | 4 ++-- zh/docs/intros/buiding/index.html | 4 ++-- zh/docs/intros/change-cef-ver/index.html | 4 ++-- zh/docs/intros/index.html | 4 ++-- zh/docs/reference/QCefConfig/index.html | 4 ++-- zh/docs/reference/QCefContext/index.html | 6 +++--- zh/docs/reference/QCefDownloadItem/index.html | 4 ++-- zh/docs/reference/QCefEvent/index.html | 4 ++-- zh/docs/reference/QCefQuery/index.html | 4 ++-- zh/docs/reference/QCefSetting/index.html | 4 ++-- zh/docs/reference/QCefView/index.html | 6 +++--- zh/docs/reference/WebAPIs/index.html | 4 ++-- zh/docs/reference/index.html | 4 ++-- zh/index.html | 4 ++-- 46 files changed, 84 insertions(+), 84 deletions(-) delete mode 100644 assets/js/895d7fdb.4e74906b.js create mode 100644 assets/js/895d7fdb.8406e34b.js rename assets/js/{runtime~main.da73cb05.js => runtime~main.3a23efae.js} (98%) delete mode 100644 zh/assets/js/34ec668e.9df8f6e7.js create mode 100644 zh/assets/js/34ec668e.c3dd3739.js create mode 100644 zh/assets/js/4c071278.d53a07de.js delete mode 100644 zh/assets/js/4c071278.e7569fae.js rename zh/assets/js/{runtime~main.3a8813c3.js => runtime~main.8d7d71fb.js} (98%) diff --git a/404.html b/404.html index d4922523..9f9c500e 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/895d7fdb.4e74906b.js b/assets/js/895d7fdb.4e74906b.js deleted file mode 100644 index 1f4adee8..00000000 --- a/assets/js/895d7fdb.4e74906b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkqcefviewdoc=self.webpackChunkqcefviewdoc||[]).push([[332],{3905:(e,t,a)=>{a.d(t,{Zo:()=>s,kt:()=>k});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var l=n.createContext({}),d=function(e){var t=n.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},s=function(e){var t=d(e.components);return n.createElement(l.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),p=d(a),m=r,k=p["".concat(l,".").concat(m)]||p[m]||f[m]||i;return a?n.createElement(k,o(o({ref:t},s),{},{components:a})):n.createElement(k,o({ref:t},s))}));function k(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,o=new Array(i);o[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[p]="string"==typeof e?e:r,o[1]=c;for(var d=2;d{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>f,frontMatter:()=>i,metadata:()=>c,toc:()=>d});var n=a(7462),r=(a(7294),a(3905));const i={title:"QCefContext"},o="class QCefContext",c={unversionedId:"reference/QCefContext",id:"reference/QCefContext",title:"QCefContext",description:"classqcef_context}",source:"@site/docs/reference/QCefContext.md",sourceDirName:"reference",slug:"/reference/QCefContext",permalink:"/QCefView/docs/reference/QCefContext",draft:!1,editUrl:"https://github.com/CefView/QCefViewDoc/tree/master/docs/reference/QCefContext.md",tags:[],version:"current",frontMatter:{title:"QCefContext"},sidebar:"default",previous:{title:"QCefConfig",permalink:"/QCefView/docs/reference/QCefConfig"},next:{title:"QCefDownloadItem",permalink:"/QCefView/docs/reference/QCefDownloadItem"}},l={},d=[{value:"Summary",id:"summary",level:2},{value:"Members",id:"members",level:2},{value:"public QCefContext(QCoreApplication * app, int argc, char ** argv, const QCefConfig * config)",id:"class_q_cef_context_1aa2b8af8d2d806ba8b5110e868d314c8c",level:3},{value:"Parameters",id:"parameters",level:4},{value:"public ~QCefContext()",id:"class_q_cef_context_1a91de7d9c36aafdaca390a355d6da5c6d",level:3},{value:"public void addLocalFolderResource(const QString & path, const QString & url, int priority)",id:"class_q_cef_context_1aecc6f7ee9d296bcf8d2ba470e0c0e454",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"public void addArchiveResource(const QString & path, const QString & url, const QString & password, int priority)",id:"class_q_cef_context_1aba9c70a84379190d151bdc4b634367e6",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"public bool addCookie(const QString & name, const QString & value, const QString & domain, const QString & url)",id:"class_q_cef_context_1a6d2e90de7fb5fcf2b7e7a6581d26e62c",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns",level:4},{value:"public bool deleteAllCookies()",id:"class_q_cef_context_1a794e41a74ddabc503bed5e8c47fe3dd0",level:3},{value:"Returns",id:"returns-1",level:4},{value:"public bool addCrossOriginWhitelistEntry(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)",id:"class_q_cef_context_1aaba077228a77f5e7d7491eda3ce10267",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-2",level:4},{value:"public bool removeCrossOriginWhitelistEntry(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)",id:"class_q_cef_context_1af04aefeea503031f5a8fbdabf05bc5e8",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-3",level:4},{value:"public bool clearCrossOriginWhitelistEntry()",id:"class_q_cef_context_1a95d71c83fef34e8218a8ce559f173ab4",level:3},{value:"public const QCefConfig*cefConfig() const",id:"class_q_cef_context_1acfd6416ebc0a8df5cf8961dadeff960e",level:3},{value:"Returns",id:"returns-4",level:4},{value:"protected bool init(const QCefConfig * config)",id:"class_q_cef_context_1a78836c8d4d2bdf4970a256d8d29c80c6",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-5",level:4},{value:"protected void uninit()",id:"class_q_cef_context_1aee74a7460786ddc17f8f9c0f68eaab6b",level:3},{value:"private QScopedPointer< QCefContextPrivate > d_ptr",id:"class_q_cef_context_1a502cdbb18c3abae014e6b8ee42948645",level:3},{value:"public static QCefContext*instance()",id:"class_q_cef_context_1a3e6491f837fdd72c7b4fefed5569853b",level:3},{value:"Returns",id:"returns-6",level:4}],s={toc:d},p="wrapper";function f(e){let{components:t,...a}=e;return(0,r.kt)(p,(0,n.Z)({},s,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"class_q_cef_context"},"class ",(0,r.kt)("inlineCode",{parentName:"h1"},"QCefContext")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"class QCefContext\n : public QObject\n")),(0,r.kt)("p",null,"Represents the CEF context."),(0,r.kt)("h2",{id:"summary"},"Summary"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Members"),(0,r.kt)("th",{parentName:"tr",align:null},"Descriptions"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1aa2b8af8d2d806ba8b5110e868d314c8c"},(0,r.kt)("inlineCode",{parentName:"a"},"QCefContext")),(0,r.kt)("inlineCode",{parentName:"td"},"(QCoreApplication * app, int argc, char ** argv, const "),(0,r.kt)("a",{parentName:"td",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},(0,r.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,r.kt)("inlineCode",{parentName:"td"}," * config)")),(0,r.kt)("td",{parentName:"tr",align:null},"Constructs the CEF context.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a91de7d9c36aafdaca390a355d6da5c6d"},(0,r.kt)("inlineCode",{parentName:"a"},"~QCefContext")),(0,r.kt)("inlineCode",{parentName:"td"},"()")),(0,r.kt)("td",{parentName:"tr",align:null},"Destructs the CEF context.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public void "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1aecc6f7ee9d296bcf8d2ba470e0c0e454"},(0,r.kt)("inlineCode",{parentName:"a"},"addLocalFolderResource")),(0,r.kt)("inlineCode",{parentName:"td"},"(const QString & path, const QString & url, int priority)")),(0,r.kt)("td",{parentName:"tr",align:null},"Adds a url mapping item with local web resource directory. This works for all instances created subsequently.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public void "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1aba9c70a84379190d151bdc4b634367e6"},(0,r.kt)("inlineCode",{parentName:"a"},"addArchiveResource")),(0,r.kt)("inlineCode",{parentName:"td"},"(const QString & path, const QString & url, const QString & password, int priority)")),(0,r.kt)("td",{parentName:"tr",align:null},"Adds a url mapping item with local archive (.zip) file which contains the web resource. This works for all instances created subsequently.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public bool "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a6d2e90de7fb5fcf2b7e7a6581d26e62c"},(0,r.kt)("inlineCode",{parentName:"a"},"addCookie")),(0,r.kt)("inlineCode",{parentName:"td"},"(const QString & name, const QString & value, const QString & domain, const QString & url)")),(0,r.kt)("td",{parentName:"tr",align:null},"Adds a cookie to the CEF context, this cookie is accessible from all browsers created with this context.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public bool "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a794e41a74ddabc503bed5e8c47fe3dd0"},(0,r.kt)("inlineCode",{parentName:"a"},"deleteAllCookies")),(0,r.kt)("inlineCode",{parentName:"td"},"()")),(0,r.kt)("td",{parentName:"tr",align:null},"Deletes all cookies from the CEF context.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public bool "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1aaba077228a77f5e7d7491eda3ce10267"},(0,r.kt)("inlineCode",{parentName:"a"},"addCrossOriginWhitelistEntry")),(0,r.kt)("inlineCode",{parentName:"td"},"(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)")),(0,r.kt)("td",{parentName:"tr",align:null},"Adds an entry to the cross-origin access whitelist.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public bool "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1af04aefeea503031f5a8fbdabf05bc5e8"},(0,r.kt)("inlineCode",{parentName:"a"},"removeCrossOriginWhitelistEntry")),(0,r.kt)("inlineCode",{parentName:"td"},"(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)")),(0,r.kt)("td",{parentName:"tr",align:null},"Removes an entry from the cross-origin access whitelist.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public bool "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a95d71c83fef34e8218a8ce559f173ab4"},(0,r.kt)("inlineCode",{parentName:"a"},"clearCrossOriginWhitelistEntry")),(0,r.kt)("inlineCode",{parentName:"td"},"()")),(0,r.kt)("td",{parentName:"tr",align:null},"Removes all entries from the cross-origin access whitelist.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public const "),(0,r.kt)("a",{parentName:"td",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},(0,r.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,r.kt)("inlineCode",{parentName:"td"},"*"),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1acfd6416ebc0a8df5cf8961dadeff960e"},(0,r.kt)("inlineCode",{parentName:"a"},"cefConfig")),(0,r.kt)("inlineCode",{parentName:"td"},"() const")),(0,r.kt)("td",{parentName:"tr",align:null},"Gets the ",(0,r.kt)("a",{parentName:"td",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},"QCefConfig"),".")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"protected bool "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a78836c8d4d2bdf4970a256d8d29c80c6"},(0,r.kt)("inlineCode",{parentName:"a"},"init")),(0,r.kt)("inlineCode",{parentName:"td"},"(const "),(0,r.kt)("a",{parentName:"td",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},(0,r.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,r.kt)("inlineCode",{parentName:"td"}," * config)")),(0,r.kt)("td",{parentName:"tr",align:null},"Initialize the CEF context.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"protected void "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1aee74a7460786ddc17f8f9c0f68eaab6b"},(0,r.kt)("inlineCode",{parentName:"a"},"uninit")),(0,r.kt)("inlineCode",{parentName:"td"},"()")),(0,r.kt)("td",{parentName:"tr",align:null},"Uninitialize the CEF context.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"private QScopedPointer< QCefContextPrivate > "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a502cdbb18c3abae014e6b8ee42948645"},(0,r.kt)("inlineCode",{parentName:"a"},"d_ptr"))),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public static "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context"},(0,r.kt)("inlineCode",{parentName:"a"},"QCefContext")),(0,r.kt)("inlineCode",{parentName:"td"},"*"),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a3e6491f837fdd72c7b4fefed5569853b"},(0,r.kt)("inlineCode",{parentName:"a"},"instance")),(0,r.kt)("inlineCode",{parentName:"td"},"()")),(0,r.kt)("td",{parentName:"tr",align:null},"Gets the unique default instance.")))),(0,r.kt)("h2",{id:"members"},"Members"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1aa2b8af8d2d806ba8b5110e868d314c8c"},(0,r.kt)("inlineCode",{parentName:"h3"},"public "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1aa2b8af8d2d806ba8b5110e868d314c8c"},(0,r.kt)("inlineCode",{parentName:"a"},"QCefContext")),(0,r.kt)("inlineCode",{parentName:"h3"},"(QCoreApplication * app, int argc, char ** argv, const "),(0,r.kt)("a",{parentName:"h3",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},(0,r.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,r.kt)("inlineCode",{parentName:"h3"}," * config)")),(0,r.kt)("p",null,"Constructs the CEF context."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"app")," The application")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"argc")," The argument count")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"argv")," The argument list pointer")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"config")," The ",(0,r.kt)("a",{parentName:"p",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},"QCefConfig")," instance"))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1a91de7d9c36aafdaca390a355d6da5c6d"},(0,r.kt)("inlineCode",{parentName:"h3"},"public "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a91de7d9c36aafdaca390a355d6da5c6d"},(0,r.kt)("inlineCode",{parentName:"a"},"~QCefContext")),(0,r.kt)("inlineCode",{parentName:"h3"},"()")),(0,r.kt)("p",null,"Destructs the CEF context."),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1aecc6f7ee9d296bcf8d2ba470e0c0e454"},(0,r.kt)("inlineCode",{parentName:"h3"},"public void "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1aecc6f7ee9d296bcf8d2ba470e0c0e454"},(0,r.kt)("inlineCode",{parentName:"a"},"addLocalFolderResource")),(0,r.kt)("inlineCode",{parentName:"h3"},"(const QString & path, const QString & url, int priority)")),(0,r.kt)("p",null,"Adds a url mapping item with local web resource directory. This works for all instances created subsequently."),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"path")," The path to the local resource directory")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"url")," The url to be mapped to")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"priority")," The priority"))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1aba9c70a84379190d151bdc4b634367e6"},(0,r.kt)("inlineCode",{parentName:"h3"},"public void "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1aba9c70a84379190d151bdc4b634367e6"},(0,r.kt)("inlineCode",{parentName:"a"},"addArchiveResource")),(0,r.kt)("inlineCode",{parentName:"h3"},"(const QString & path, const QString & url, const QString & password, int priority)")),(0,r.kt)("p",null,"Adds a url mapping item with local archive (.zip) file which contains the web resource. This works for all instances created subsequently."),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"path")," The path to the local archive file")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"url")," The url to be mapped to")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"password")," The password of the archive")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"priority")," The priority"))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1a6d2e90de7fb5fcf2b7e7a6581d26e62c"},(0,r.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a6d2e90de7fb5fcf2b7e7a6581d26e62c"},(0,r.kt)("inlineCode",{parentName:"a"},"addCookie")),(0,r.kt)("inlineCode",{parentName:"h3"},"(const QString & name, const QString & value, const QString & domain, const QString & url)")),(0,r.kt)("p",null,"Adds a cookie to the CEF context, this cookie is accessible from all browsers created with this context."),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"name")," The cookie item name")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"value")," The cookie item value")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"domain")," The applicable domain name")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"url")," The applicable url"))),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,"True on success; otherwise false"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1a794e41a74ddabc503bed5e8c47fe3dd0"},(0,r.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a794e41a74ddabc503bed5e8c47fe3dd0"},(0,r.kt)("inlineCode",{parentName:"a"},"deleteAllCookies")),(0,r.kt)("inlineCode",{parentName:"h3"},"()")),(0,r.kt)("p",null,"Deletes all cookies from the CEF context."),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,"True on success; otherwise false"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1aaba077228a77f5e7d7491eda3ce10267"},(0,r.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1aaba077228a77f5e7d7491eda3ce10267"},(0,r.kt)("inlineCode",{parentName:"a"},"addCrossOriginWhitelistEntry")),(0,r.kt)("inlineCode",{parentName:"h3"},"(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)")),(0,r.kt)("p",null,"Adds an entry to the cross-origin access whitelist."),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"sourceOrigin")," "),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"targetSchema")," "),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"targetDomain")," "),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"allowTargetSubdomains")," ")),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,"True on success; otherwise false"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1af04aefeea503031f5a8fbdabf05bc5e8"},(0,r.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1af04aefeea503031f5a8fbdabf05bc5e8"},(0,r.kt)("inlineCode",{parentName:"a"},"removeCrossOriginWhitelistEntry")),(0,r.kt)("inlineCode",{parentName:"h3"},"(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)")),(0,r.kt)("p",null,"Removes an entry from the cross-origin access whitelist."),(0,r.kt)("h4",{id:"parameters-5"},"Parameters"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"sourceOrigin")," "),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"targetSchema")," "),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"targetDomain")," "),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"allowTargetSubdomains")," ")),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,"True on success; otherwise false"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1a95d71c83fef34e8218a8ce559f173ab4"},(0,r.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a95d71c83fef34e8218a8ce559f173ab4"},(0,r.kt)("inlineCode",{parentName:"a"},"clearCrossOriginWhitelistEntry")),(0,r.kt)("inlineCode",{parentName:"h3"},"()")),(0,r.kt)("p",null,"Removes all entries from the cross-origin access whitelist."),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1acfd6416ebc0a8df5cf8961dadeff960e"},(0,r.kt)("inlineCode",{parentName:"h3"},"public const "),(0,r.kt)("a",{parentName:"h3",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},(0,r.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,r.kt)("inlineCode",{parentName:"h3"},"*"),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1acfd6416ebc0a8df5cf8961dadeff960e"},(0,r.kt)("inlineCode",{parentName:"a"},"cefConfig")),(0,r.kt)("inlineCode",{parentName:"h3"},"() const")),(0,r.kt)("p",null,"Gets the ",(0,r.kt)("a",{parentName:"p",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},"QCefConfig"),"."),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,"The ",(0,r.kt)("a",{parentName:"p",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},"QCefConfig")," instance"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1a78836c8d4d2bdf4970a256d8d29c80c6"},(0,r.kt)("inlineCode",{parentName:"h3"},"protected bool "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a78836c8d4d2bdf4970a256d8d29c80c6"},(0,r.kt)("inlineCode",{parentName:"a"},"init")),(0,r.kt)("inlineCode",{parentName:"h3"},"(const "),(0,r.kt)("a",{parentName:"h3",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},(0,r.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,r.kt)("inlineCode",{parentName:"h3"}," * config)")),(0,r.kt)("p",null,"Initialize the CEF context."),(0,r.kt)("h4",{id:"parameters-6"},"Parameters"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"config")," The ",(0,r.kt)("a",{parentName:"li",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},"QCefConfig")," instance")),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,"True on success; otherwise false"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1aee74a7460786ddc17f8f9c0f68eaab6b"},(0,r.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1aee74a7460786ddc17f8f9c0f68eaab6b"},(0,r.kt)("inlineCode",{parentName:"a"},"uninit")),(0,r.kt)("inlineCode",{parentName:"h3"},"()")),(0,r.kt)("p",null,"Uninitialize the CEF context."),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1a502cdbb18c3abae014e6b8ee42948645"},(0,r.kt)("inlineCode",{parentName:"h3"},"private QScopedPointer< QCefContextPrivate > "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a502cdbb18c3abae014e6b8ee42948645"},(0,r.kt)("inlineCode",{parentName:"a"},"d_ptr"))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1a3e6491f837fdd72c7b4fefed5569853b"},(0,r.kt)("inlineCode",{parentName:"h3"},"public static "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context"},(0,r.kt)("inlineCode",{parentName:"a"},"QCefContext")),(0,r.kt)("inlineCode",{parentName:"h3"},"*"),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a3e6491f837fdd72c7b4fefed5569853b"},(0,r.kt)("inlineCode",{parentName:"a"},"instance")),(0,r.kt)("inlineCode",{parentName:"h3"},"()")),(0,r.kt)("p",null,"Gets the unique default instance."),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,"The default instance"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/895d7fdb.8406e34b.js b/assets/js/895d7fdb.8406e34b.js new file mode 100644 index 00000000..ec21b01e --- /dev/null +++ b/assets/js/895d7fdb.8406e34b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkqcefviewdoc=self.webpackChunkqcefviewdoc||[]).push([[332],{3905:(e,t,a)=>{a.d(t,{Zo:()=>s,kt:()=>u});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function c(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var l=n.createContext({}),d=function(e){var t=n.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):c(c({},t),e)),a},s=function(e){var t=d(e.components);return n.createElement(l.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),p=d(a),m=r,u=p["".concat(l,".").concat(m)]||p[m]||f[m]||i;return a?n.createElement(u,c(c({ref:t},s),{},{components:a})):n.createElement(u,c({ref:t},s))}));function u(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=a.length,c=new Array(i);c[0]=m;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[p]="string"==typeof e?e:r,c[1]=o;for(var d=2;d{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>f,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var n=a(7462),r=(a(7294),a(3905));const i={title:"QCefContext"},c="class QCefContext",o={unversionedId:"reference/QCefContext",id:"reference/QCefContext",title:"QCefContext",description:"classqcef_context}",source:"@site/docs/reference/QCefContext.md",sourceDirName:"reference",slug:"/reference/QCefContext",permalink:"/QCefView/docs/reference/QCefContext",draft:!1,editUrl:"https://github.com/CefView/QCefViewDoc/tree/master/docs/reference/QCefContext.md",tags:[],version:"current",frontMatter:{title:"QCefContext"},sidebar:"default",previous:{title:"QCefConfig",permalink:"/QCefView/docs/reference/QCefConfig"},next:{title:"QCefDownloadItem",permalink:"/QCefView/docs/reference/QCefDownloadItem"}},l={},d=[{value:"Summary",id:"summary",level:2},{value:"Members",id:"members",level:2},{value:"public QCefContext(QCoreApplication * app, int argc, char ** argv, const QCefConfig * config)",id:"class_q_cef_context_1aa2b8af8d2d806ba8b5110e868d314c8c",level:3},{value:"Parameters",id:"parameters",level:4},{value:"public ~QCefContext()",id:"class_q_cef_context_1a91de7d9c36aafdaca390a355d6da5c6d",level:3},{value:"public void addLocalFolderResource(const QString & path, const QString & url, int priority)",id:"class_q_cef_context_1aecc6f7ee9d296bcf8d2ba470e0c0e454",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"public void addArchiveResource(const QString & path, const QString & url, const QString & password, int priority)",id:"class_q_cef_context_1aba9c70a84379190d151bdc4b634367e6",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"public bool addCookie(const QString & name, const QString & value, const QString & domain, const QString & url)",id:"class_q_cef_context_1a6d2e90de7fb5fcf2b7e7a6581d26e62c",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns",level:4},{value:"public bool deleteAllCookies()",id:"class_q_cef_context_1a794e41a74ddabc503bed5e8c47fe3dd0",level:3},{value:"Returns",id:"returns-1",level:4},{value:"public bool addCrossOriginWhitelistEntry(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)",id:"class_q_cef_context_1aaba077228a77f5e7d7491eda3ce10267",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-2",level:4},{value:"public bool removeCrossOriginWhitelistEntry(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)",id:"class_q_cef_context_1af04aefeea503031f5a8fbdabf05bc5e8",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-3",level:4},{value:"public bool clearCrossOriginWhitelistEntry()",id:"class_q_cef_context_1a95d71c83fef34e8218a8ce559f173ab4",level:3},{value:"public const QCefConfig*cefConfig() const",id:"class_q_cef_context_1acfd6416ebc0a8df5cf8961dadeff960e",level:3},{value:"Returns",id:"returns-4",level:4},{value:"protected bool init(const QCefConfig * config)",id:"class_q_cef_context_1a78836c8d4d2bdf4970a256d8d29c80c6",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-5",level:4},{value:"protected void uninit()",id:"class_q_cef_context_1aee74a7460786ddc17f8f9c0f68eaab6b",level:3},{value:"private QScopedPointer< QCefContextPrivate > d_ptr",id:"class_q_cef_context_1a502cdbb18c3abae014e6b8ee42948645",level:3},{value:"public static QCefContext*instance()",id:"class_q_cef_context_1a3e6491f837fdd72c7b4fefed5569853b",level:3},{value:"Returns",id:"returns-6",level:4}],s={toc:d},p="wrapper";function f(e){let{components:t,...a}=e;return(0,r.kt)(p,(0,n.Z)({},s,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"class_q_cef_context"},"class ",(0,r.kt)("inlineCode",{parentName:"h1"},"QCefContext")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"class QCefContext\n : public QObject\n")),(0,r.kt)("p",null,"Represents the CEF context."),(0,r.kt)("h2",{id:"summary"},"Summary"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Members"),(0,r.kt)("th",{parentName:"tr",align:null},"Descriptions"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1aa2b8af8d2d806ba8b5110e868d314c8c"},(0,r.kt)("inlineCode",{parentName:"a"},"QCefContext")),(0,r.kt)("inlineCode",{parentName:"td"},"(QCoreApplication * app, int argc, char ** argv, const "),(0,r.kt)("a",{parentName:"td",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},(0,r.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,r.kt)("inlineCode",{parentName:"td"}," * config)")),(0,r.kt)("td",{parentName:"tr",align:null},"Constructs the CEF context.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a91de7d9c36aafdaca390a355d6da5c6d"},(0,r.kt)("inlineCode",{parentName:"a"},"~QCefContext")),(0,r.kt)("inlineCode",{parentName:"td"},"()")),(0,r.kt)("td",{parentName:"tr",align:null},"Destructs the CEF context.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public void "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1aecc6f7ee9d296bcf8d2ba470e0c0e454"},(0,r.kt)("inlineCode",{parentName:"a"},"addLocalFolderResource")),(0,r.kt)("inlineCode",{parentName:"td"},"(const QString & path, const QString & url, int priority)")),(0,r.kt)("td",{parentName:"tr",align:null},"Adds a url mapping item with local web resource directory. This works for all instances created subsequently.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public void "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1aba9c70a84379190d151bdc4b634367e6"},(0,r.kt)("inlineCode",{parentName:"a"},"addArchiveResource")),(0,r.kt)("inlineCode",{parentName:"td"},"(const QString & path, const QString & url, const QString & password, int priority)")),(0,r.kt)("td",{parentName:"tr",align:null},"Adds a url mapping item with local archive (.zip) file which contains the web resource. This works for all instances created subsequently.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public bool "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a6d2e90de7fb5fcf2b7e7a6581d26e62c"},(0,r.kt)("inlineCode",{parentName:"a"},"addCookie")),(0,r.kt)("inlineCode",{parentName:"td"},"(const QString & name, const QString & value, const QString & domain, const QString & url)")),(0,r.kt)("td",{parentName:"tr",align:null},"Adds a cookie to the CEF context, this cookie is accessible from all browsers created with this context.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public bool "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a794e41a74ddabc503bed5e8c47fe3dd0"},(0,r.kt)("inlineCode",{parentName:"a"},"deleteAllCookies")),(0,r.kt)("inlineCode",{parentName:"td"},"()")),(0,r.kt)("td",{parentName:"tr",align:null},"Deletes all cookies from the CEF context.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public bool "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1aaba077228a77f5e7d7491eda3ce10267"},(0,r.kt)("inlineCode",{parentName:"a"},"addCrossOriginWhitelistEntry")),(0,r.kt)("inlineCode",{parentName:"td"},"(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)")),(0,r.kt)("td",{parentName:"tr",align:null},"Adds an entry to the cross-origin access whitelist. For details please refer to: ",(0,r.kt)("a",{parentName:"td",href:"https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L81C23-L81C23"},"https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L81C23-L81C23"),".")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public bool "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1af04aefeea503031f5a8fbdabf05bc5e8"},(0,r.kt)("inlineCode",{parentName:"a"},"removeCrossOriginWhitelistEntry")),(0,r.kt)("inlineCode",{parentName:"td"},"(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)")),(0,r.kt)("td",{parentName:"tr",align:null},"Removes an entry from the cross-origin access whitelist. For details please refer to: ",(0,r.kt)("a",{parentName:"td",href:"https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L91C12-L91C12"},"https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L91C12-L91C12"),".")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public bool "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a95d71c83fef34e8218a8ce559f173ab4"},(0,r.kt)("inlineCode",{parentName:"a"},"clearCrossOriginWhitelistEntry")),(0,r.kt)("inlineCode",{parentName:"td"},"()")),(0,r.kt)("td",{parentName:"tr",align:null},"Removes all entries from the cross-origin access whitelist.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public const "),(0,r.kt)("a",{parentName:"td",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},(0,r.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,r.kt)("inlineCode",{parentName:"td"},"*"),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1acfd6416ebc0a8df5cf8961dadeff960e"},(0,r.kt)("inlineCode",{parentName:"a"},"cefConfig")),(0,r.kt)("inlineCode",{parentName:"td"},"() const")),(0,r.kt)("td",{parentName:"tr",align:null},"Gets the ",(0,r.kt)("a",{parentName:"td",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},"QCefConfig"),".")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"protected bool "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a78836c8d4d2bdf4970a256d8d29c80c6"},(0,r.kt)("inlineCode",{parentName:"a"},"init")),(0,r.kt)("inlineCode",{parentName:"td"},"(const "),(0,r.kt)("a",{parentName:"td",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},(0,r.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,r.kt)("inlineCode",{parentName:"td"}," * config)")),(0,r.kt)("td",{parentName:"tr",align:null},"Initialize the CEF context.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"protected void "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1aee74a7460786ddc17f8f9c0f68eaab6b"},(0,r.kt)("inlineCode",{parentName:"a"},"uninit")),(0,r.kt)("inlineCode",{parentName:"td"},"()")),(0,r.kt)("td",{parentName:"tr",align:null},"Uninitialize the CEF context.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"private QScopedPointer< QCefContextPrivate > "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a502cdbb18c3abae014e6b8ee42948645"},(0,r.kt)("inlineCode",{parentName:"a"},"d_ptr"))),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"public static "),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context"},(0,r.kt)("inlineCode",{parentName:"a"},"QCefContext")),(0,r.kt)("inlineCode",{parentName:"td"},"*"),(0,r.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a3e6491f837fdd72c7b4fefed5569853b"},(0,r.kt)("inlineCode",{parentName:"a"},"instance")),(0,r.kt)("inlineCode",{parentName:"td"},"()")),(0,r.kt)("td",{parentName:"tr",align:null},"Gets the unique default instance.")))),(0,r.kt)("h2",{id:"members"},"Members"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1aa2b8af8d2d806ba8b5110e868d314c8c"},(0,r.kt)("inlineCode",{parentName:"h3"},"public "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1aa2b8af8d2d806ba8b5110e868d314c8c"},(0,r.kt)("inlineCode",{parentName:"a"},"QCefContext")),(0,r.kt)("inlineCode",{parentName:"h3"},"(QCoreApplication * app, int argc, char ** argv, const "),(0,r.kt)("a",{parentName:"h3",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},(0,r.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,r.kt)("inlineCode",{parentName:"h3"}," * config)")),(0,r.kt)("p",null,"Constructs the CEF context."),(0,r.kt)("h4",{id:"parameters"},"Parameters"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"app")," The application")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"argc")," The argument count")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"argv")," The argument list pointer")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"config")," The ",(0,r.kt)("a",{parentName:"p",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},"QCefConfig")," instance"))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1a91de7d9c36aafdaca390a355d6da5c6d"},(0,r.kt)("inlineCode",{parentName:"h3"},"public "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a91de7d9c36aafdaca390a355d6da5c6d"},(0,r.kt)("inlineCode",{parentName:"a"},"~QCefContext")),(0,r.kt)("inlineCode",{parentName:"h3"},"()")),(0,r.kt)("p",null,"Destructs the CEF context."),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1aecc6f7ee9d296bcf8d2ba470e0c0e454"},(0,r.kt)("inlineCode",{parentName:"h3"},"public void "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1aecc6f7ee9d296bcf8d2ba470e0c0e454"},(0,r.kt)("inlineCode",{parentName:"a"},"addLocalFolderResource")),(0,r.kt)("inlineCode",{parentName:"h3"},"(const QString & path, const QString & url, int priority)")),(0,r.kt)("p",null,"Adds a url mapping item with local web resource directory. This works for all instances created subsequently."),(0,r.kt)("h4",{id:"parameters-1"},"Parameters"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"path")," The path to the local resource directory")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"url")," The url to be mapped to")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"priority")," The priority"))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1aba9c70a84379190d151bdc4b634367e6"},(0,r.kt)("inlineCode",{parentName:"h3"},"public void "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1aba9c70a84379190d151bdc4b634367e6"},(0,r.kt)("inlineCode",{parentName:"a"},"addArchiveResource")),(0,r.kt)("inlineCode",{parentName:"h3"},"(const QString & path, const QString & url, const QString & password, int priority)")),(0,r.kt)("p",null,"Adds a url mapping item with local archive (.zip) file which contains the web resource. This works for all instances created subsequently."),(0,r.kt)("h4",{id:"parameters-2"},"Parameters"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"path")," The path to the local archive file")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"url")," The url to be mapped to")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"password")," The password of the archive")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"priority")," The priority"))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1a6d2e90de7fb5fcf2b7e7a6581d26e62c"},(0,r.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a6d2e90de7fb5fcf2b7e7a6581d26e62c"},(0,r.kt)("inlineCode",{parentName:"a"},"addCookie")),(0,r.kt)("inlineCode",{parentName:"h3"},"(const QString & name, const QString & value, const QString & domain, const QString & url)")),(0,r.kt)("p",null,"Adds a cookie to the CEF context, this cookie is accessible from all browsers created with this context."),(0,r.kt)("h4",{id:"parameters-3"},"Parameters"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"name")," The cookie item name")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"value")," The cookie item value")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"domain")," The applicable domain name")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"url")," The applicable url"))),(0,r.kt)("h4",{id:"returns"},"Returns"),(0,r.kt)("p",null,"True on success; otherwise false"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1a794e41a74ddabc503bed5e8c47fe3dd0"},(0,r.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a794e41a74ddabc503bed5e8c47fe3dd0"},(0,r.kt)("inlineCode",{parentName:"a"},"deleteAllCookies")),(0,r.kt)("inlineCode",{parentName:"h3"},"()")),(0,r.kt)("p",null,"Deletes all cookies from the CEF context."),(0,r.kt)("h4",{id:"returns-1"},"Returns"),(0,r.kt)("p",null,"True on success; otherwise false"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1aaba077228a77f5e7d7491eda3ce10267"},(0,r.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1aaba077228a77f5e7d7491eda3ce10267"},(0,r.kt)("inlineCode",{parentName:"a"},"addCrossOriginWhitelistEntry")),(0,r.kt)("inlineCode",{parentName:"h3"},"(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)")),(0,r.kt)("p",null,"Adds an entry to the cross-origin access whitelist. For details please refer to: ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L81C23-L81C23"},"https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L81C23-L81C23"),"."),(0,r.kt)("h4",{id:"parameters-4"},"Parameters"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"sourceOrigin")," The source origin")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"targetSchema")," The target schema")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"targetDomain")," The target domain")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"allowTargetSubdomains")," Whether to allow subdomain or not"))),(0,r.kt)("h4",{id:"returns-2"},"Returns"),(0,r.kt)("p",null,"True on success; otherwise false"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1af04aefeea503031f5a8fbdabf05bc5e8"},(0,r.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1af04aefeea503031f5a8fbdabf05bc5e8"},(0,r.kt)("inlineCode",{parentName:"a"},"removeCrossOriginWhitelistEntry")),(0,r.kt)("inlineCode",{parentName:"h3"},"(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)")),(0,r.kt)("p",null,"Removes an entry from the cross-origin access whitelist. For details please refer to: ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L91C12-L91C12"},"https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L91C12-L91C12"),"."),(0,r.kt)("h4",{id:"parameters-5"},"Parameters"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"sourceOrigin")," The source origin")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"targetSchema")," The target schema")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"targetDomain")," The target domain")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"allowTargetSubdomains")," Whether to allow subdomain or not"))),(0,r.kt)("h4",{id:"returns-3"},"Returns"),(0,r.kt)("p",null,"True on success; otherwise false"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1a95d71c83fef34e8218a8ce559f173ab4"},(0,r.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a95d71c83fef34e8218a8ce559f173ab4"},(0,r.kt)("inlineCode",{parentName:"a"},"clearCrossOriginWhitelistEntry")),(0,r.kt)("inlineCode",{parentName:"h3"},"()")),(0,r.kt)("p",null,"Removes all entries from the cross-origin access whitelist."),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1acfd6416ebc0a8df5cf8961dadeff960e"},(0,r.kt)("inlineCode",{parentName:"h3"},"public const "),(0,r.kt)("a",{parentName:"h3",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},(0,r.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,r.kt)("inlineCode",{parentName:"h3"},"*"),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1acfd6416ebc0a8df5cf8961dadeff960e"},(0,r.kt)("inlineCode",{parentName:"a"},"cefConfig")),(0,r.kt)("inlineCode",{parentName:"h3"},"() const")),(0,r.kt)("p",null,"Gets the ",(0,r.kt)("a",{parentName:"p",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},"QCefConfig"),"."),(0,r.kt)("h4",{id:"returns-4"},"Returns"),(0,r.kt)("p",null,"The ",(0,r.kt)("a",{parentName:"p",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},"QCefConfig")," instance"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1a78836c8d4d2bdf4970a256d8d29c80c6"},(0,r.kt)("inlineCode",{parentName:"h3"},"protected bool "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a78836c8d4d2bdf4970a256d8d29c80c6"},(0,r.kt)("inlineCode",{parentName:"a"},"init")),(0,r.kt)("inlineCode",{parentName:"h3"},"(const "),(0,r.kt)("a",{parentName:"h3",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},(0,r.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,r.kt)("inlineCode",{parentName:"h3"}," * config)")),(0,r.kt)("p",null,"Initialize the CEF context."),(0,r.kt)("h4",{id:"parameters-6"},"Parameters"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"config")," The ",(0,r.kt)("a",{parentName:"li",href:"/QCefView/docs/reference/QCefConfig#class_q_cef_config"},"QCefConfig")," instance")),(0,r.kt)("h4",{id:"returns-5"},"Returns"),(0,r.kt)("p",null,"True on success; otherwise false"),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1aee74a7460786ddc17f8f9c0f68eaab6b"},(0,r.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1aee74a7460786ddc17f8f9c0f68eaab6b"},(0,r.kt)("inlineCode",{parentName:"a"},"uninit")),(0,r.kt)("inlineCode",{parentName:"h3"},"()")),(0,r.kt)("p",null,"Uninitialize the CEF context."),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1a502cdbb18c3abae014e6b8ee42948645"},(0,r.kt)("inlineCode",{parentName:"h3"},"private QScopedPointer< QCefContextPrivate > "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a502cdbb18c3abae014e6b8ee42948645"},(0,r.kt)("inlineCode",{parentName:"a"},"d_ptr"))),(0,r.kt)("hr",null),(0,r.kt)("h3",{id:"class_q_cef_context_1a3e6491f837fdd72c7b4fefed5569853b"},(0,r.kt)("inlineCode",{parentName:"h3"},"public static "),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context"},(0,r.kt)("inlineCode",{parentName:"a"},"QCefContext")),(0,r.kt)("inlineCode",{parentName:"h3"},"*"),(0,r.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a3e6491f837fdd72c7b4fefed5569853b"},(0,r.kt)("inlineCode",{parentName:"a"},"instance")),(0,r.kt)("inlineCode",{parentName:"h3"},"()")),(0,r.kt)("p",null,"Gets the unique default instance."),(0,r.kt)("h4",{id:"returns-6"},"Returns"),(0,r.kt)("p",null,"The default instance"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.da73cb05.js b/assets/js/runtime~main.3a23efae.js similarity index 98% rename from assets/js/runtime~main.da73cb05.js rename to assets/js/runtime~main.3a23efae.js index 452213aa..fee18db8 100644 --- a/assets/js/runtime~main.da73cb05.js +++ b/assets/js/runtime~main.3a23efae.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:"4e74906b",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[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 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 a6fb942f..81bc0baf 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 deb698ab..e13a208a 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 0b965697..38f6f04c 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 099ef89f..837a5d1f 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 c023eb99..fff5fbac 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.

- + \ 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 b090fa01..722c933f 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 d8831bc1..314345b4 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 d0d00d46..a1359bd7 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 d64787f9..faa48e65 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.
public bool removeCrossOriginWhitelistEntry(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)Removes an entry from the cross-origin access whitelist.
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.

Parameters

  • sourceOrigin
  • targetSchema
  • targetDomain
  • allowTargetSubdomains

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.

Parameters

  • sourceOrigin
  • targetSchema
  • targetDomain
  • allowTargetSubdomains

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

- +

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 8bbb8d06..8ff51f2c 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 e907193a..c6615d5f 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 33324694..d913ef06 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 e7e04cee..455fc1f4 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 275350eb..75cf5dfb 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 65645cb0..5a1be748 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 974c07aa..abed3a2d 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 6b4c6f98..f5a193ac 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 diff --git a/zh/404.html b/zh/404.html index 4bd6c8c1..c40afc7b 100644 --- a/zh/404.html +++ b/zh/404.html @@ -4,13 +4,13 @@ 没有找到请求的页面 | QCefView - +

没有找到请求的页面

没有找到请求的资源.

请联系站点所有者告知链接损坏.

- + \ No newline at end of file diff --git a/zh/assets/js/34ec668e.9df8f6e7.js b/zh/assets/js/34ec668e.9df8f6e7.js deleted file mode 100644 index 7c0bb1a5..00000000 --- a/zh/assets/js/34ec668e.9df8f6e7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkqcefviewdoc=self.webpackChunkqcefviewdoc||[]).push([[311],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>s});var n=a(7294);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(i[a]=e[a]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var c=n.createContext({}),d=function(e){var t=n.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},p=function(e){var t=d(e.components);return n.createElement(c.Provider,{value:t},e.children)},f="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},k=n.forwardRef((function(e,t){var a=e.components,i=e.mdxType,r=e.originalType,c=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),f=d(a),k=i,s=f["".concat(c,".").concat(k)]||f[k]||m[k]||r;return a?n.createElement(s,l(l({ref:t},p),{},{components:a})):n.createElement(s,l({ref:t},p))}));function s(e,t){var a=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=a.length,l=new Array(r);l[0]=k;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[f]="string"==typeof e?e:i,l[1]=o;for(var d=2;d{a.r(t),a.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>m,frontMatter:()=>r,metadata:()=>o,toc:()=>d});var n=a(7462),i=(a(7294),a(3905));const r={title:"QCefContext"},l="class QCefContext",o={unversionedId:"reference/QCefContext",id:"reference/QCefContext",title:"QCefContext",description:"classqcef_context}",source:"@site/i18n/zh/docusaurus-plugin-content-docs/current/reference/QCefContext.md",sourceDirName:"reference",slug:"/reference/QCefContext",permalink:"/QCefView/zh/docs/reference/QCefContext",draft:!1,editUrl:"https://github.com/CefView/QCefViewDoc/tree/master/i18n/zh/docusaurus-plugin-content-docs/current/reference/QCefContext.md",tags:[],version:"current",frontMatter:{title:"QCefContext"},sidebar:"default",previous:{title:"QCefConfig",permalink:"/QCefView/zh/docs/reference/QCefConfig"},next:{title:"QCefDownloadItem",permalink:"/QCefView/zh/docs/reference/QCefDownloadItem"}},c={},d=[{value:"\u603b\u7ed3",id:"\u603b\u7ed3",level:2},{value:"Members",id:"members",level:2},{value:"public QCefContext(QCoreApplication * app, int argc, char ** argv, const QCefConfig * config)",id:"class_q_cef_context_1aa2b8af8d2d806ba8b5110e868d314c8c",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570",level:4},{value:"public ~QCefContext()",id:"class_q_cef_context_1a91de7d9c36aafdaca390a355d6da5c6d",level:3},{value:"public void addLocalFolderResource(const QString & path, const QString & url, int priority)",id:"class_q_cef_context_1aecc6f7ee9d296bcf8d2ba470e0c0e454",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-1",level:4},{value:"public void addArchiveResource(const QString & path, const QString & url, const QString & password, int priority)",id:"class_q_cef_context_1aba9c70a84379190d151bdc4b634367e6",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-2",level:4},{value:"public bool addCookie(const QString & name, const QString & value, const QString & domain, const QString & url)",id:"class_q_cef_context_1a6d2e90de7fb5fcf2b7e7a6581d26e62c",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-3",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c",level:4},{value:"public bool deleteAllCookies()",id:"class_q_cef_context_1a794e41a74ddabc503bed5e8c47fe3dd0",level:3},{value:"public bool addCrossOriginWhitelistEntry(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)",id:"class_q_cef_context_1aaba077228a77f5e7d7491eda3ce10267",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-4",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-1",level:4},{value:"public bool removeCrossOriginWhitelistEntry(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)",id:"class_q_cef_context_1af04aefeea503031f5a8fbdabf05bc5e8",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-5",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-2",level:4},{value:"public bool clearCrossOriginWhitelistEntry()",id:"class_q_cef_context_1a95d71c83fef34e8218a8ce559f173ab4",level:3},{value:"public const QCefConfig*cefConfig() const",id:"class_q_cef_context_1acfd6416ebc0a8df5cf8961dadeff960e",level:3},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-3",level:4},{value:"protected bool init(const QCefConfig * config)",id:"class_q_cef_context_1a78836c8d4d2bdf4970a256d8d29c80c6",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-6",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-4",level:4},{value:"protected void uninit()",id:"class_q_cef_context_1aee74a7460786ddc17f8f9c0f68eaab6b",level:3},{value:"private QScopedPointer< QCefContextPrivate > d_ptr",id:"class_q_cef_context_1a502cdbb18c3abae014e6b8ee42948645",level:3},{value:"public static QCefContext*instance()",id:"class_q_cef_context_1a3e6491f837fdd72c7b4fefed5569853b",level:3},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-5",level:4}],p={toc:d},f="wrapper";function m(e){let{components:t,...a}=e;return(0,i.kt)(f,(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"class_q_cef_context"},"class ",(0,i.kt)("inlineCode",{parentName:"h1"},"QCefContext")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"class QCefContext\n : public QObject\n")),(0,i.kt)("p",null,"\u8868\u793a CEF \u4e0a\u4e0b\u6587"),(0,i.kt)("h2",{id:"\u603b\u7ed3"},"\u603b\u7ed3"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"\u6210\u5458"),(0,i.kt)("th",{parentName:"tr",align:null},"\u63cf\u8ff0"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_context_1aa2b8af8d2d806ba8b5110e868d314c8c"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefContext")),(0,i.kt)("inlineCode",{parentName:"td"},"(QCoreApplication * app, int argc, char ** argv, const "),(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,i.kt)("inlineCode",{parentName:"td"}," * config)")),(0,i.kt)("td",{parentName:"tr",align:null},"QCefContext \u6784\u9020\u51fd\u6570")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a91de7d9c36aafdaca390a355d6da5c6d"},(0,i.kt)("inlineCode",{parentName:"a"},"~QCefContext")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"QCefContext \u6790\u6784\u51fd\u6570")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_context_1aecc6f7ee9d296bcf8d2ba470e0c0e454"},(0,i.kt)("inlineCode",{parentName:"a"},"addLocalFolderResource")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString & path, const QString & url, int priority)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u6dfb\u52a0\u5177\u6709\u672c\u5730 Web \u8d44\u6e90\u76ee\u5f55\u7684 url \u6620\u5c04\u9879\u3002\u8fd9\u9002\u7528\u4e8e\u968f\u540e\u521b\u5efa\u7684\u6240\u6709\u5b9e\u4f8b")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_context_1aba9c70a84379190d151bdc4b634367e6"},(0,i.kt)("inlineCode",{parentName:"a"},"addArchiveResource")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString & path, const QString & url, const QString & password, int priority)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u4f7f\u7528\u5305\u542b Web \u8d44\u6e90\u7684\u672c\u5730\u5b58\u6863 \uff08.zip\uff09 \u6587\u4ef6\u6dfb\u52a0 url \u6620\u5c04\u9879\u3002\u8fd9\u9002\u7528\u4e8e\u968f\u540e\u521b\u5efa\u7684\u6240\u6709\u5b9e\u4f8b")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a6d2e90de7fb5fcf2b7e7a6581d26e62c"},(0,i.kt)("inlineCode",{parentName:"a"},"addCookie")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString & name, const QString & value, const QString & domain, const QString & url)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5c06 Cookie \u6dfb\u52a0\u5230 CEF \u4e0a\u4e0b\u6587\uff0c\u53ef\u4ece\u4f7f\u7528\u6b64\u4e0a\u4e0b\u6587\u521b\u5efa\u7684\u6240\u6709\u6d4f\u89c8\u5668\u8bbf\u95ee\u6b64 Cookie")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a794e41a74ddabc503bed5e8c47fe3dd0"},(0,i.kt)("inlineCode",{parentName:"a"},"deleteAllCookies")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u4ece CEF \u4e0a\u4e0b\u6587\u4e2d\u5220\u9664\u6240\u6709 cookie")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_context_1aaba077228a77f5e7d7491eda3ce10267"},(0,i.kt)("inlineCode",{parentName:"a"},"addCrossOriginWhitelistEntry")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5c06\u6761\u76ee\u6dfb\u52a0\u5230\u8de8\u57df\u8bbf\u95ee\u767d\u540d\u5355\u4e2d")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_context_1af04aefeea503031f5a8fbdabf05bc5e8"},(0,i.kt)("inlineCode",{parentName:"a"},"removeCrossOriginWhitelistEntry")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u4ece\u8de8\u57df\u8bbf\u95ee\u767d\u540d\u5355\u4e2d\u5220\u9664\u4e00\u4e2a\u6761\u76ee")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a95d71c83fef34e8218a8ce559f173ab4"},(0,i.kt)("inlineCode",{parentName:"a"},"clearCrossOriginWhitelistEntry")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u4ece\u8de8\u57df\u8bbf\u95ee\u767d\u540d\u5355\u4e2d\u5220\u9664\u6240\u6709\u6761\u76ee")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public const "),(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,i.kt)("inlineCode",{parentName:"td"},"*"),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_context_1acfd6416ebc0a8df5cf8961dadeff960e"},(0,i.kt)("inlineCode",{parentName:"a"},"cefConfig")),(0,i.kt)("inlineCode",{parentName:"td"},"() const")),(0,i.kt)("td",{parentName:"tr",align:null},"\u83b7\u53d6 ",(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},"QCefConfig"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a78836c8d4d2bdf4970a256d8d29c80c6"},(0,i.kt)("inlineCode",{parentName:"a"},"init")),(0,i.kt)("inlineCode",{parentName:"td"},"(const "),(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,i.kt)("inlineCode",{parentName:"td"}," * config)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u521d\u59cb\u5316 CEF \u4e0a\u4e0b\u6587")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_context_1aee74a7460786ddc17f8f9c0f68eaab6b"},(0,i.kt)("inlineCode",{parentName:"a"},"uninit")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u53d6\u6d88\u521d\u59cb\u5316 CEF \u4e0a\u4e0b\u6587")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"private QScopedPointer< QCefContextPrivate > "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a502cdbb18c3abae014e6b8ee42948645"},(0,i.kt)("inlineCode",{parentName:"a"},"d_ptr"))),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public static "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_context"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefContext")),(0,i.kt)("inlineCode",{parentName:"td"},"*"),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a3e6491f837fdd72c7b4fefed5569853b"},(0,i.kt)("inlineCode",{parentName:"a"},"instance")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u83b7\u53d6\u552f\u4e00\u7684\u9ed8\u8ba4\u5b9e\u4f8b")))),(0,i.kt)("h2",{id:"members"},"Members"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_context_1aa2b8af8d2d806ba8b5110e868d314c8c"},(0,i.kt)("inlineCode",{parentName:"h3"},"public "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1aa2b8af8d2d806ba8b5110e868d314c8c"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefContext")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QCoreApplication * app, int argc, char ** argv, const "),(0,i.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,i.kt)("inlineCode",{parentName:"h3"}," * config)")),(0,i.kt)("p",null,"QCefContext \u6784\u9020\u51fd\u6570"),(0,i.kt)("h4",{id:"\u53c2\u6570"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"app")," QCoreApplication \u5b9e\u4f8b")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"argc")," main() \u53c2\u6570 argc")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"argv")," main() \u53c2\u6570 argv")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"config")," ",(0,i.kt)("a",{parentName:"p",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},"QCefConfig")," \u5b9e\u4f8b"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_context_1a91de7d9c36aafdaca390a355d6da5c6d"},(0,i.kt)("inlineCode",{parentName:"h3"},"public "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a91de7d9c36aafdaca390a355d6da5c6d"},(0,i.kt)("inlineCode",{parentName:"a"},"~QCefContext")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"QCefContext \u6790\u6784\u51fd\u6570"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_context_1aecc6f7ee9d296bcf8d2ba470e0c0e454"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1aecc6f7ee9d296bcf8d2ba470e0c0e454"},(0,i.kt)("inlineCode",{parentName:"a"},"addLocalFolderResource")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString & path, const QString & url, int priority)")),(0,i.kt)("p",null,"\u6dfb\u52a0\u5177\u6709\u672c\u5730 Web \u8d44\u6e90\u76ee\u5f55\u7684 url \u6620\u5c04\u9879\u3002\u8fd9\u9002\u7528\u4e8e\u968f\u540e\u521b\u5efa\u7684\u6240\u6709\u5b9e\u4f8b"),(0,i.kt)("h4",{id:"\u53c2\u6570-1"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"path")," \u672c\u5730\u8d44\u6e90\u76ee\u5f55\u7684\u8def\u5f84")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"url")," \u8981\u6620\u5c04\u5230\u7684\u7f51\u5740")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"priority")," \u4f18\u5148\u7ea7"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_context_1aba9c70a84379190d151bdc4b634367e6"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1aba9c70a84379190d151bdc4b634367e6"},(0,i.kt)("inlineCode",{parentName:"a"},"addArchiveResource")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString & path, const QString & url, const QString & password, int priority)")),(0,i.kt)("p",null,"\u4f7f\u7528\u5305\u542b Web \u8d44\u6e90\u7684\u672c\u5730\u5b58\u6863 \uff08.zip\uff09 \u6587\u4ef6\u6dfb\u52a0 url \u6620\u5c04\u9879\u3002\u8fd9\u9002\u7528\u4e8e\u968f\u540e\u521b\u5efa\u7684\u6240\u6709\u5b9e\u4f8b"),(0,i.kt)("h4",{id:"\u53c2\u6570-2"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"path")," \u672c\u5730\u5b58\u6863\u6587\u4ef6\u7684\u8def\u5f84")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"url")," \u8981\u6620\u5c04\u5230\u7684\u7f51\u5740")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"password")," \u5b58\u6863\u7684\u5bc6\u7801")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"priority")," \u4f18\u5148\u7ea7"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_context_1a6d2e90de7fb5fcf2b7e7a6581d26e62c"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a6d2e90de7fb5fcf2b7e7a6581d26e62c"},(0,i.kt)("inlineCode",{parentName:"a"},"addCookie")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString & name, const QString & value, const QString & domain, const QString & url)")),(0,i.kt)("p",null,"\u5c06 Cookie \u6dfb\u52a0\u5230 CEF \u4e0a\u4e0b\u6587\uff0c\u53ef\u4ece\u4f7f\u7528\u6b64\u4e0a\u4e0b\u6587\u521b\u5efa\u7684\u6240\u6709\u6d4f\u89c8\u5668\u8bbf\u95ee\u6b64 Cookie"),(0,i.kt)("h4",{id:"\u53c2\u6570-3"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"name")," cookie \u9879\u540d\u79f0")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"value")," cookie \u9879\u503c")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"domain")," \u9002\u7528\u7684\u57df\u540d")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"url")," \u9002\u7528\u7684\u7f51\u5740"))),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"True \u4e3a\u6210\u529f; \u5176\u4ed6\u4e3a false"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_context_1a794e41a74ddabc503bed5e8c47fe3dd0"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a794e41a74ddabc503bed5e8c47fe3dd0"},(0,i.kt)("inlineCode",{parentName:"a"},"deleteAllCookies")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u4ece CEF \u4e0a\u4e0b\u6587\u4e2d\u5220\u9664\u6240\u6709 cookie"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_context_1aaba077228a77f5e7d7491eda3ce10267"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1aaba077228a77f5e7d7491eda3ce10267"},(0,i.kt)("inlineCode",{parentName:"a"},"addCrossOriginWhitelistEntry")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)")),(0,i.kt)("p",null,"\u5c06\u6761\u76ee\u6dfb\u52a0\u5230\u8de8\u57df\u8bbf\u95ee\u767d\u540d\u5355"),(0,i.kt)("h4",{id:"\u53c2\u6570-4"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"sourceOrigin")," "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"targetSchema")," "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"targetDomain")," "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"allowTargetSubdomains")," ")),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-1"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"True \u4e3a\u6210\u529f; \u5176\u4ed6\u4e3a false"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_context_1af04aefeea503031f5a8fbdabf05bc5e8"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1af04aefeea503031f5a8fbdabf05bc5e8"},(0,i.kt)("inlineCode",{parentName:"a"},"removeCrossOriginWhitelistEntry")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)")),(0,i.kt)("p",null,"\u4ece\u8de8\u57df\u8bbf\u95ee\u767d\u540d\u5355\u4e2d\u5220\u9664\u4e00\u4e2a\u6761\u76ee"),(0,i.kt)("h4",{id:"\u53c2\u6570-5"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"sourceOrigin")," "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"targetSchema")," "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"targetDomain")," "),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"allowTargetSubdomains")," ")),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-2"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"True \u4e3a\u6210\u529f; \u5176\u4ed6\u4e3a false"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_context_1a95d71c83fef34e8218a8ce559f173ab4"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a95d71c83fef34e8218a8ce559f173ab4"},(0,i.kt)("inlineCode",{parentName:"a"},"clearCrossOriginWhitelistEntry")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u4ece\u8de8\u57df\u8bbf\u95ee\u767d\u540d\u5355\u4e2d\u5220\u9664\u6240\u6709\u6761\u76ee"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_context_1acfd6416ebc0a8df5cf8961dadeff960e"},(0,i.kt)("inlineCode",{parentName:"h3"},"public const "),(0,i.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,i.kt)("inlineCode",{parentName:"h3"},"*"),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1acfd6416ebc0a8df5cf8961dadeff960e"},(0,i.kt)("inlineCode",{parentName:"a"},"cefConfig")),(0,i.kt)("inlineCode",{parentName:"h3"},"() const")),(0,i.kt)("p",null,"\u83b7\u53d6 ",(0,i.kt)("a",{parentName:"p",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},"QCefConfig")),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-3"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},"QCefConfig")," \u5b9e\u4f8b"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_context_1a78836c8d4d2bdf4970a256d8d29c80c6"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a78836c8d4d2bdf4970a256d8d29c80c6"},(0,i.kt)("inlineCode",{parentName:"a"},"init")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const "),(0,i.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,i.kt)("inlineCode",{parentName:"h3"}," * config)")),(0,i.kt)("p",null,"\u521d\u59cb\u5316 CEF \u4e0a\u4e0b\u6587"),(0,i.kt)("h4",{id:"\u53c2\u6570-6"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"config")," ",(0,i.kt)("a",{parentName:"li",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},"QCefConfig")," \u5b9e\u4f8b")),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-4"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"True \u4e3a\u6210\u529f; \u5176\u4ed6\u4e3a false"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_context_1aee74a7460786ddc17f8f9c0f68eaab6b"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1aee74a7460786ddc17f8f9c0f68eaab6b"},(0,i.kt)("inlineCode",{parentName:"a"},"uninit")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u53d6\u6d88\u521d\u59cb\u5316 CEF \u4e0a\u4e0b\u6587"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_context_1a502cdbb18c3abae014e6b8ee42948645"},(0,i.kt)("inlineCode",{parentName:"h3"},"private QScopedPointer< QCefContextPrivate > "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a502cdbb18c3abae014e6b8ee42948645"},(0,i.kt)("inlineCode",{parentName:"a"},"d_ptr"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_context_1a3e6491f837fdd72c7b4fefed5569853b"},(0,i.kt)("inlineCode",{parentName:"h3"},"public static "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_context"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefContext")),(0,i.kt)("inlineCode",{parentName:"h3"},"*"),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a3e6491f837fdd72c7b4fefed5569853b"},(0,i.kt)("inlineCode",{parentName:"a"},"instance")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u83b7\u53d6\u552f\u4e00\u7684\u9ed8\u8ba4\u5b9e\u4f8b"),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-5"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u9ed8\u8ba4\u5b9e\u4f8b"))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/zh/assets/js/34ec668e.c3dd3739.js b/zh/assets/js/34ec668e.c3dd3739.js new file mode 100644 index 00000000..242ba184 --- /dev/null +++ b/zh/assets/js/34ec668e.c3dd3739.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkqcefviewdoc=self.webpackChunkqcefviewdoc||[]).push([[311],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>k});var n=a(7294);function c(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function r(e){for(var t=1;t=0||(c[a]=e[a]);return c}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(c[a]=e[a])}return c}var o=n.createContext({}),d=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},p=function(e){var t=d(e.components);return n.createElement(o.Provider,{value:t},e.children)},f="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},s=n.forwardRef((function(e,t){var a=e.components,c=e.mdxType,i=e.originalType,o=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),f=d(a),s=c,k=f["".concat(o,".").concat(s)]||f[s]||m[s]||i;return a?n.createElement(k,r(r({ref:t},p),{},{components:a})):n.createElement(k,r({ref:t},p))}));function k(e,t){var a=arguments,c=t&&t.mdxType;if("string"==typeof e||c){var i=a.length,r=new Array(i);r[0]=s;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l[f]="string"==typeof e?e:c,r[1]=l;for(var d=2;d{a.r(t),a.d(t,{assets:()=>o,contentTitle:()=>r,default:()=>m,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var n=a(7462),c=(a(7294),a(3905));const i={title:"QCefContext"},r="class QCefContext",l={unversionedId:"reference/QCefContext",id:"reference/QCefContext",title:"QCefContext",description:"classqcef_context}",source:"@site/i18n/zh/docusaurus-plugin-content-docs/current/reference/QCefContext.md",sourceDirName:"reference",slug:"/reference/QCefContext",permalink:"/QCefView/zh/docs/reference/QCefContext",draft:!1,editUrl:"https://github.com/CefView/QCefViewDoc/tree/master/i18n/zh/docusaurus-plugin-content-docs/current/reference/QCefContext.md",tags:[],version:"current",frontMatter:{title:"QCefContext"},sidebar:"default",previous:{title:"QCefConfig",permalink:"/QCefView/zh/docs/reference/QCefConfig"},next:{title:"QCefDownloadItem",permalink:"/QCefView/zh/docs/reference/QCefDownloadItem"}},o={},d=[{value:"\u603b\u7ed3",id:"\u603b\u7ed3",level:2},{value:"Members",id:"members",level:2},{value:"public QCefContext(QCoreApplication * app, int argc, char ** argv, const QCefConfig * config)",id:"class_q_cef_context_1aa2b8af8d2d806ba8b5110e868d314c8c",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570",level:4},{value:"public ~QCefContext()",id:"class_q_cef_context_1a91de7d9c36aafdaca390a355d6da5c6d",level:3},{value:"public void addLocalFolderResource(const QString & path, const QString & url, int priority)",id:"class_q_cef_context_1aecc6f7ee9d296bcf8d2ba470e0c0e454",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-1",level:4},{value:"public void addArchiveResource(const QString & path, const QString & url, const QString & password, int priority)",id:"class_q_cef_context_1aba9c70a84379190d151bdc4b634367e6",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-2",level:4},{value:"public bool addCookie(const QString & name, const QString & value, const QString & domain, const QString & url)",id:"class_q_cef_context_1a6d2e90de7fb5fcf2b7e7a6581d26e62c",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-3",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c",level:4},{value:"public bool deleteAllCookies()",id:"class_q_cef_context_1a794e41a74ddabc503bed5e8c47fe3dd0",level:3},{value:"public bool addCrossOriginWhitelistEntry(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)",id:"class_q_cef_context_1aaba077228a77f5e7d7491eda3ce10267",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-4",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-1",level:4},{value:"public bool removeCrossOriginWhitelistEntry(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)",id:"class_q_cef_context_1af04aefeea503031f5a8fbdabf05bc5e8",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-5",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-2",level:4},{value:"public bool clearCrossOriginWhitelistEntry()",id:"class_q_cef_context_1a95d71c83fef34e8218a8ce559f173ab4",level:3},{value:"public const QCefConfig*cefConfig() const",id:"class_q_cef_context_1acfd6416ebc0a8df5cf8961dadeff960e",level:3},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-3",level:4},{value:"protected bool init(const QCefConfig * config)",id:"class_q_cef_context_1a78836c8d4d2bdf4970a256d8d29c80c6",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-6",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-4",level:4},{value:"protected void uninit()",id:"class_q_cef_context_1aee74a7460786ddc17f8f9c0f68eaab6b",level:3},{value:"private QScopedPointer< QCefContextPrivate > d_ptr",id:"class_q_cef_context_1a502cdbb18c3abae014e6b8ee42948645",level:3},{value:"public static QCefContext*instance()",id:"class_q_cef_context_1a3e6491f837fdd72c7b4fefed5569853b",level:3},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-5",level:4}],p={toc:d},f="wrapper";function m(e){let{components:t,...a}=e;return(0,c.kt)(f,(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,c.kt)("h1",{id:"class_q_cef_context"},"class ",(0,c.kt)("inlineCode",{parentName:"h1"},"QCefContext")),(0,c.kt)("pre",null,(0,c.kt)("code",{parentName:"pre"},"class QCefContext\n : public QObject\n")),(0,c.kt)("p",null,"\u8868\u793a CEF \u4e0a\u4e0b\u6587"),(0,c.kt)("h2",{id:"\u603b\u7ed3"},"\u603b\u7ed3"),(0,c.kt)("table",null,(0,c.kt)("thead",{parentName:"table"},(0,c.kt)("tr",{parentName:"thead"},(0,c.kt)("th",{parentName:"tr",align:null},"\u6210\u5458"),(0,c.kt)("th",{parentName:"tr",align:null},"\u63cf\u8ff0"))),(0,c.kt)("tbody",{parentName:"table"},(0,c.kt)("tr",{parentName:"tbody"},(0,c.kt)("td",{parentName:"tr",align:null},(0,c.kt)("inlineCode",{parentName:"td"},"public "),(0,c.kt)("a",{parentName:"td",href:"#class_q_cef_context_1aa2b8af8d2d806ba8b5110e868d314c8c"},(0,c.kt)("inlineCode",{parentName:"a"},"QCefContext")),(0,c.kt)("inlineCode",{parentName:"td"},"(QCoreApplication * app, int argc, char ** argv, const "),(0,c.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},(0,c.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,c.kt)("inlineCode",{parentName:"td"}," * config)")),(0,c.kt)("td",{parentName:"tr",align:null},"QCefContext \u6784\u9020\u51fd\u6570")),(0,c.kt)("tr",{parentName:"tbody"},(0,c.kt)("td",{parentName:"tr",align:null},(0,c.kt)("inlineCode",{parentName:"td"},"public "),(0,c.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a91de7d9c36aafdaca390a355d6da5c6d"},(0,c.kt)("inlineCode",{parentName:"a"},"~QCefContext")),(0,c.kt)("inlineCode",{parentName:"td"},"()")),(0,c.kt)("td",{parentName:"tr",align:null},"QCefContext \u6790\u6784\u51fd\u6570")),(0,c.kt)("tr",{parentName:"tbody"},(0,c.kt)("td",{parentName:"tr",align:null},(0,c.kt)("inlineCode",{parentName:"td"},"public void "),(0,c.kt)("a",{parentName:"td",href:"#class_q_cef_context_1aecc6f7ee9d296bcf8d2ba470e0c0e454"},(0,c.kt)("inlineCode",{parentName:"a"},"addLocalFolderResource")),(0,c.kt)("inlineCode",{parentName:"td"},"(const QString & path, const QString & url, int priority)")),(0,c.kt)("td",{parentName:"tr",align:null},"\u6dfb\u52a0\u5177\u6709\u672c\u5730 Web \u8d44\u6e90\u76ee\u5f55\u7684 url \u6620\u5c04\u9879\u3002\u8fd9\u9002\u7528\u4e8e\u968f\u540e\u521b\u5efa\u7684\u6240\u6709\u5b9e\u4f8b")),(0,c.kt)("tr",{parentName:"tbody"},(0,c.kt)("td",{parentName:"tr",align:null},(0,c.kt)("inlineCode",{parentName:"td"},"public void "),(0,c.kt)("a",{parentName:"td",href:"#class_q_cef_context_1aba9c70a84379190d151bdc4b634367e6"},(0,c.kt)("inlineCode",{parentName:"a"},"addArchiveResource")),(0,c.kt)("inlineCode",{parentName:"td"},"(const QString & path, const QString & url, const QString & password, int priority)")),(0,c.kt)("td",{parentName:"tr",align:null},"\u4f7f\u7528\u5305\u542b Web \u8d44\u6e90\u7684\u672c\u5730\u5b58\u6863 \uff08.zip\uff09 \u6587\u4ef6\u6dfb\u52a0 url \u6620\u5c04\u9879\u3002\u8fd9\u9002\u7528\u4e8e\u968f\u540e\u521b\u5efa\u7684\u6240\u6709\u5b9e\u4f8b")),(0,c.kt)("tr",{parentName:"tbody"},(0,c.kt)("td",{parentName:"tr",align:null},(0,c.kt)("inlineCode",{parentName:"td"},"public bool "),(0,c.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a6d2e90de7fb5fcf2b7e7a6581d26e62c"},(0,c.kt)("inlineCode",{parentName:"a"},"addCookie")),(0,c.kt)("inlineCode",{parentName:"td"},"(const QString & name, const QString & value, const QString & domain, const QString & url)")),(0,c.kt)("td",{parentName:"tr",align:null},"\u5c06 Cookie \u6dfb\u52a0\u5230 CEF \u4e0a\u4e0b\u6587\uff0c\u53ef\u4ece\u4f7f\u7528\u6b64\u4e0a\u4e0b\u6587\u521b\u5efa\u7684\u6240\u6709\u6d4f\u89c8\u5668\u8bbf\u95ee\u6b64 Cookie")),(0,c.kt)("tr",{parentName:"tbody"},(0,c.kt)("td",{parentName:"tr",align:null},(0,c.kt)("inlineCode",{parentName:"td"},"public bool "),(0,c.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a794e41a74ddabc503bed5e8c47fe3dd0"},(0,c.kt)("inlineCode",{parentName:"a"},"deleteAllCookies")),(0,c.kt)("inlineCode",{parentName:"td"},"()")),(0,c.kt)("td",{parentName:"tr",align:null},"\u4ece CEF \u4e0a\u4e0b\u6587\u4e2d\u5220\u9664\u6240\u6709 cookie")),(0,c.kt)("tr",{parentName:"tbody"},(0,c.kt)("td",{parentName:"tr",align:null},(0,c.kt)("inlineCode",{parentName:"td"},"public bool "),(0,c.kt)("a",{parentName:"td",href:"#class_q_cef_context_1aaba077228a77f5e7d7491eda3ce10267"},(0,c.kt)("inlineCode",{parentName:"a"},"addCrossOriginWhitelistEntry")),(0,c.kt)("inlineCode",{parentName:"td"},"(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)")),(0,c.kt)("td",{parentName:"tr",align:null},"\u5c06\u6761\u76ee\u6dfb\u52a0\u5230\u8de8\u57df\u8bbf\u95ee\u767d\u540d\u5355\u4e2d\u3002\u8be6\u60c5\u8bf7\u53c2\u9605\uff1a",(0,c.kt)("a",{parentName:"td",href:"https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L81C23-L81C23"},"https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L81C23-L81C23"))),(0,c.kt)("tr",{parentName:"tbody"},(0,c.kt)("td",{parentName:"tr",align:null},(0,c.kt)("inlineCode",{parentName:"td"},"public bool "),(0,c.kt)("a",{parentName:"td",href:"#class_q_cef_context_1af04aefeea503031f5a8fbdabf05bc5e8"},(0,c.kt)("inlineCode",{parentName:"a"},"removeCrossOriginWhitelistEntry")),(0,c.kt)("inlineCode",{parentName:"td"},"(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)")),(0,c.kt)("td",{parentName:"tr",align:null},"\u4ece\u8de8\u57df\u8bbf\u95ee\u767d\u540d\u5355\u4e2d\u5220\u9664\u4e00\u4e2a\u6761\u76ee\u3002\u8be6\u60c5\u8bf7\u53c2\u9605\uff1a",(0,c.kt)("a",{parentName:"td",href:"https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L91C12-L91C12"},"https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L91C12-L91C12"))),(0,c.kt)("tr",{parentName:"tbody"},(0,c.kt)("td",{parentName:"tr",align:null},(0,c.kt)("inlineCode",{parentName:"td"},"public bool "),(0,c.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a95d71c83fef34e8218a8ce559f173ab4"},(0,c.kt)("inlineCode",{parentName:"a"},"clearCrossOriginWhitelistEntry")),(0,c.kt)("inlineCode",{parentName:"td"},"()")),(0,c.kt)("td",{parentName:"tr",align:null},"\u4ece\u8de8\u57df\u8bbf\u95ee\u767d\u540d\u5355\u4e2d\u5220\u9664\u6240\u6709\u6761\u76ee")),(0,c.kt)("tr",{parentName:"tbody"},(0,c.kt)("td",{parentName:"tr",align:null},(0,c.kt)("inlineCode",{parentName:"td"},"public const "),(0,c.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},(0,c.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,c.kt)("inlineCode",{parentName:"td"},"*"),(0,c.kt)("a",{parentName:"td",href:"#class_q_cef_context_1acfd6416ebc0a8df5cf8961dadeff960e"},(0,c.kt)("inlineCode",{parentName:"a"},"cefConfig")),(0,c.kt)("inlineCode",{parentName:"td"},"() const")),(0,c.kt)("td",{parentName:"tr",align:null},"\u83b7\u53d6 ",(0,c.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},"QCefConfig"))),(0,c.kt)("tr",{parentName:"tbody"},(0,c.kt)("td",{parentName:"tr",align:null},(0,c.kt)("inlineCode",{parentName:"td"},"protected bool "),(0,c.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a78836c8d4d2bdf4970a256d8d29c80c6"},(0,c.kt)("inlineCode",{parentName:"a"},"init")),(0,c.kt)("inlineCode",{parentName:"td"},"(const "),(0,c.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},(0,c.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,c.kt)("inlineCode",{parentName:"td"}," * config)")),(0,c.kt)("td",{parentName:"tr",align:null},"\u521d\u59cb\u5316 CEF \u4e0a\u4e0b\u6587")),(0,c.kt)("tr",{parentName:"tbody"},(0,c.kt)("td",{parentName:"tr",align:null},(0,c.kt)("inlineCode",{parentName:"td"},"protected void "),(0,c.kt)("a",{parentName:"td",href:"#class_q_cef_context_1aee74a7460786ddc17f8f9c0f68eaab6b"},(0,c.kt)("inlineCode",{parentName:"a"},"uninit")),(0,c.kt)("inlineCode",{parentName:"td"},"()")),(0,c.kt)("td",{parentName:"tr",align:null},"\u53d6\u6d88\u521d\u59cb\u5316 CEF \u4e0a\u4e0b\u6587")),(0,c.kt)("tr",{parentName:"tbody"},(0,c.kt)("td",{parentName:"tr",align:null},(0,c.kt)("inlineCode",{parentName:"td"},"private QScopedPointer< QCefContextPrivate > "),(0,c.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a502cdbb18c3abae014e6b8ee42948645"},(0,c.kt)("inlineCode",{parentName:"a"},"d_ptr"))),(0,c.kt)("td",{parentName:"tr",align:null})),(0,c.kt)("tr",{parentName:"tbody"},(0,c.kt)("td",{parentName:"tr",align:null},(0,c.kt)("inlineCode",{parentName:"td"},"public static "),(0,c.kt)("a",{parentName:"td",href:"#class_q_cef_context"},(0,c.kt)("inlineCode",{parentName:"a"},"QCefContext")),(0,c.kt)("inlineCode",{parentName:"td"},"*"),(0,c.kt)("a",{parentName:"td",href:"#class_q_cef_context_1a3e6491f837fdd72c7b4fefed5569853b"},(0,c.kt)("inlineCode",{parentName:"a"},"instance")),(0,c.kt)("inlineCode",{parentName:"td"},"()")),(0,c.kt)("td",{parentName:"tr",align:null},"\u83b7\u53d6\u552f\u4e00\u7684\u9ed8\u8ba4\u5b9e\u4f8b")))),(0,c.kt)("h2",{id:"members"},"Members"),(0,c.kt)("hr",null),(0,c.kt)("h3",{id:"class_q_cef_context_1aa2b8af8d2d806ba8b5110e868d314c8c"},(0,c.kt)("inlineCode",{parentName:"h3"},"public "),(0,c.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1aa2b8af8d2d806ba8b5110e868d314c8c"},(0,c.kt)("inlineCode",{parentName:"a"},"QCefContext")),(0,c.kt)("inlineCode",{parentName:"h3"},"(QCoreApplication * app, int argc, char ** argv, const "),(0,c.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},(0,c.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,c.kt)("inlineCode",{parentName:"h3"}," * config)")),(0,c.kt)("p",null,"QCefContext \u6784\u9020\u51fd\u6570"),(0,c.kt)("h4",{id:"\u53c2\u6570"},"\u53c2\u6570"),(0,c.kt)("ul",null,(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("p",{parentName:"li"},(0,c.kt)("inlineCode",{parentName:"p"},"app")," QCoreApplication \u5b9e\u4f8b")),(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("p",{parentName:"li"},(0,c.kt)("inlineCode",{parentName:"p"},"argc")," main() \u53c2\u6570 argc")),(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("p",{parentName:"li"},(0,c.kt)("inlineCode",{parentName:"p"},"argv")," main() \u53c2\u6570 argv")),(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("p",{parentName:"li"},(0,c.kt)("inlineCode",{parentName:"p"},"config")," ",(0,c.kt)("a",{parentName:"p",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},"QCefConfig")," \u5b9e\u4f8b"))),(0,c.kt)("hr",null),(0,c.kt)("h3",{id:"class_q_cef_context_1a91de7d9c36aafdaca390a355d6da5c6d"},(0,c.kt)("inlineCode",{parentName:"h3"},"public "),(0,c.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a91de7d9c36aafdaca390a355d6da5c6d"},(0,c.kt)("inlineCode",{parentName:"a"},"~QCefContext")),(0,c.kt)("inlineCode",{parentName:"h3"},"()")),(0,c.kt)("p",null,"QCefContext \u6790\u6784\u51fd\u6570"),(0,c.kt)("hr",null),(0,c.kt)("h3",{id:"class_q_cef_context_1aecc6f7ee9d296bcf8d2ba470e0c0e454"},(0,c.kt)("inlineCode",{parentName:"h3"},"public void "),(0,c.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1aecc6f7ee9d296bcf8d2ba470e0c0e454"},(0,c.kt)("inlineCode",{parentName:"a"},"addLocalFolderResource")),(0,c.kt)("inlineCode",{parentName:"h3"},"(const QString & path, const QString & url, int priority)")),(0,c.kt)("p",null,"\u6dfb\u52a0\u5177\u6709\u672c\u5730 Web \u8d44\u6e90\u76ee\u5f55\u7684 url \u6620\u5c04\u9879\u3002\u8fd9\u9002\u7528\u4e8e\u968f\u540e\u521b\u5efa\u7684\u6240\u6709\u5b9e\u4f8b"),(0,c.kt)("h4",{id:"\u53c2\u6570-1"},"\u53c2\u6570"),(0,c.kt)("ul",null,(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("p",{parentName:"li"},(0,c.kt)("inlineCode",{parentName:"p"},"path")," \u672c\u5730\u8d44\u6e90\u76ee\u5f55\u7684\u8def\u5f84")),(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("p",{parentName:"li"},(0,c.kt)("inlineCode",{parentName:"p"},"url")," \u8981\u6620\u5c04\u5230\u7684\u7f51\u5740")),(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("p",{parentName:"li"},(0,c.kt)("inlineCode",{parentName:"p"},"priority")," \u4f18\u5148\u7ea7"))),(0,c.kt)("hr",null),(0,c.kt)("h3",{id:"class_q_cef_context_1aba9c70a84379190d151bdc4b634367e6"},(0,c.kt)("inlineCode",{parentName:"h3"},"public void "),(0,c.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1aba9c70a84379190d151bdc4b634367e6"},(0,c.kt)("inlineCode",{parentName:"a"},"addArchiveResource")),(0,c.kt)("inlineCode",{parentName:"h3"},"(const QString & path, const QString & url, const QString & password, int priority)")),(0,c.kt)("p",null,"\u4f7f\u7528\u5305\u542b Web \u8d44\u6e90\u7684\u672c\u5730\u5b58\u6863 \uff08.zip\uff09 \u6587\u4ef6\u6dfb\u52a0 url \u6620\u5c04\u9879\u3002\u8fd9\u9002\u7528\u4e8e\u968f\u540e\u521b\u5efa\u7684\u6240\u6709\u5b9e\u4f8b"),(0,c.kt)("h4",{id:"\u53c2\u6570-2"},"\u53c2\u6570"),(0,c.kt)("ul",null,(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("p",{parentName:"li"},(0,c.kt)("inlineCode",{parentName:"p"},"path")," \u672c\u5730\u5b58\u6863\u6587\u4ef6\u7684\u8def\u5f84")),(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("p",{parentName:"li"},(0,c.kt)("inlineCode",{parentName:"p"},"url")," \u8981\u6620\u5c04\u5230\u7684\u7f51\u5740")),(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("p",{parentName:"li"},(0,c.kt)("inlineCode",{parentName:"p"},"password")," \u5b58\u6863\u7684\u5bc6\u7801")),(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("p",{parentName:"li"},(0,c.kt)("inlineCode",{parentName:"p"},"priority")," \u4f18\u5148\u7ea7"))),(0,c.kt)("hr",null),(0,c.kt)("h3",{id:"class_q_cef_context_1a6d2e90de7fb5fcf2b7e7a6581d26e62c"},(0,c.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,c.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a6d2e90de7fb5fcf2b7e7a6581d26e62c"},(0,c.kt)("inlineCode",{parentName:"a"},"addCookie")),(0,c.kt)("inlineCode",{parentName:"h3"},"(const QString & name, const QString & value, const QString & domain, const QString & url)")),(0,c.kt)("p",null,"\u5c06 Cookie \u6dfb\u52a0\u5230 CEF \u4e0a\u4e0b\u6587\uff0c\u53ef\u4ece\u4f7f\u7528\u6b64\u4e0a\u4e0b\u6587\u521b\u5efa\u7684\u6240\u6709\u6d4f\u89c8\u5668\u8bbf\u95ee\u6b64 Cookie"),(0,c.kt)("h4",{id:"\u53c2\u6570-3"},"\u53c2\u6570"),(0,c.kt)("ul",null,(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("p",{parentName:"li"},(0,c.kt)("inlineCode",{parentName:"p"},"name")," cookie \u9879\u540d\u79f0")),(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("p",{parentName:"li"},(0,c.kt)("inlineCode",{parentName:"p"},"value")," cookie \u9879\u503c")),(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("p",{parentName:"li"},(0,c.kt)("inlineCode",{parentName:"p"},"domain")," \u9002\u7528\u7684\u57df\u540d")),(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("p",{parentName:"li"},(0,c.kt)("inlineCode",{parentName:"p"},"url")," \u9002\u7528\u7684\u7f51\u5740"))),(0,c.kt)("h4",{id:"\u8fd4\u56de\u503c"},"\u8fd4\u56de\u503c"),(0,c.kt)("p",null,"True \u4e3a\u6210\u529f; \u5176\u4ed6\u4e3a false"),(0,c.kt)("hr",null),(0,c.kt)("h3",{id:"class_q_cef_context_1a794e41a74ddabc503bed5e8c47fe3dd0"},(0,c.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,c.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a794e41a74ddabc503bed5e8c47fe3dd0"},(0,c.kt)("inlineCode",{parentName:"a"},"deleteAllCookies")),(0,c.kt)("inlineCode",{parentName:"h3"},"()")),(0,c.kt)("p",null,"\u4ece CEF \u4e0a\u4e0b\u6587\u4e2d\u5220\u9664\u6240\u6709 cookie"),(0,c.kt)("hr",null),(0,c.kt)("h3",{id:"class_q_cef_context_1aaba077228a77f5e7d7491eda3ce10267"},(0,c.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,c.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1aaba077228a77f5e7d7491eda3ce10267"},(0,c.kt)("inlineCode",{parentName:"a"},"addCrossOriginWhitelistEntry")),(0,c.kt)("inlineCode",{parentName:"h3"},"(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)")),(0,c.kt)("p",null,"\u5c06\u6761\u76ee\u6dfb\u52a0\u5230\u8de8\u57df\u8bbf\u95ee\u767d\u540d\u5355\u3002\u8be6\u60c5\u8bf7\u53c2\u9605\uff1a",(0,c.kt)("a",{parentName:"p",href:"https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L81C23-L81C23"},"https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L81C23-L81C23")),(0,c.kt)("h4",{id:"\u53c2\u6570-4"},"\u53c2\u6570"),(0,c.kt)("ul",null,(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("inlineCode",{parentName:"li"},"sourceOrigin")," \u6e90\u5934"),(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("inlineCode",{parentName:"li"},"targetSchema")," \u76ee\u6807\u6a21\u5f0f"),(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("inlineCode",{parentName:"li"},"targetDomain")," \u76ee\u6807\u57df"),(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("inlineCode",{parentName:"li"},"allowTargetSubdomains")," \u662f\u5426\u5141\u8bb8\u5b50\u57df")),(0,c.kt)("h4",{id:"\u8fd4\u56de\u503c-1"},"\u8fd4\u56de\u503c"),(0,c.kt)("p",null,"True \u4e3a\u6210\u529f; \u5176\u4ed6\u4e3a false"),(0,c.kt)("hr",null),(0,c.kt)("h3",{id:"class_q_cef_context_1af04aefeea503031f5a8fbdabf05bc5e8"},(0,c.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,c.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1af04aefeea503031f5a8fbdabf05bc5e8"},(0,c.kt)("inlineCode",{parentName:"a"},"removeCrossOriginWhitelistEntry")),(0,c.kt)("inlineCode",{parentName:"h3"},"(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)")),(0,c.kt)("p",null,"\u4ece\u8de8\u57df\u8bbf\u95ee\u767d\u540d\u5355\u4e2d\u5220\u9664\u4e00\u4e2a\u6761\u76ee\u3002\u8be6\u60c5\u8bf7\u53c2\u9605\uff1a",(0,c.kt)("a",{parentName:"p",href:"https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L91C12-L91C12"},"https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L91C12-L91C12")),(0,c.kt)("h4",{id:"\u53c2\u6570-5"},"\u53c2\u6570"),(0,c.kt)("ul",null,(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("inlineCode",{parentName:"li"},"sourceOrigin")," \u6e90\u5934"),(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("inlineCode",{parentName:"li"},"targetSchema")," \u76ee\u6807\u6a21\u5f0f"),(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("inlineCode",{parentName:"li"},"targetDomain")," \u76ee\u6807\u57df"),(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("inlineCode",{parentName:"li"},"allowTargetSubdomains")," \u662f\u5426\u5141\u8bb8\u5b50\u57df")),(0,c.kt)("h4",{id:"\u8fd4\u56de\u503c-2"},"\u8fd4\u56de\u503c"),(0,c.kt)("p",null,"True \u4e3a\u6210\u529f; \u5176\u4ed6\u4e3a false"),(0,c.kt)("hr",null),(0,c.kt)("h3",{id:"class_q_cef_context_1a95d71c83fef34e8218a8ce559f173ab4"},(0,c.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,c.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a95d71c83fef34e8218a8ce559f173ab4"},(0,c.kt)("inlineCode",{parentName:"a"},"clearCrossOriginWhitelistEntry")),(0,c.kt)("inlineCode",{parentName:"h3"},"()")),(0,c.kt)("p",null,"\u4ece\u8de8\u57df\u8bbf\u95ee\u767d\u540d\u5355\u4e2d\u5220\u9664\u6240\u6709\u6761\u76ee"),(0,c.kt)("hr",null),(0,c.kt)("h3",{id:"class_q_cef_context_1acfd6416ebc0a8df5cf8961dadeff960e"},(0,c.kt)("inlineCode",{parentName:"h3"},"public const "),(0,c.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},(0,c.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,c.kt)("inlineCode",{parentName:"h3"},"*"),(0,c.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1acfd6416ebc0a8df5cf8961dadeff960e"},(0,c.kt)("inlineCode",{parentName:"a"},"cefConfig")),(0,c.kt)("inlineCode",{parentName:"h3"},"() const")),(0,c.kt)("p",null,"\u83b7\u53d6 ",(0,c.kt)("a",{parentName:"p",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},"QCefConfig")),(0,c.kt)("h4",{id:"\u8fd4\u56de\u503c-3"},"\u8fd4\u56de\u503c"),(0,c.kt)("p",null,(0,c.kt)("a",{parentName:"p",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},"QCefConfig")," \u5b9e\u4f8b"),(0,c.kt)("hr",null),(0,c.kt)("h3",{id:"class_q_cef_context_1a78836c8d4d2bdf4970a256d8d29c80c6"},(0,c.kt)("inlineCode",{parentName:"h3"},"protected bool "),(0,c.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a78836c8d4d2bdf4970a256d8d29c80c6"},(0,c.kt)("inlineCode",{parentName:"a"},"init")),(0,c.kt)("inlineCode",{parentName:"h3"},"(const "),(0,c.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},(0,c.kt)("inlineCode",{parentName:"a"},"QCefConfig")),(0,c.kt)("inlineCode",{parentName:"h3"}," * config)")),(0,c.kt)("p",null,"\u521d\u59cb\u5316 CEF \u4e0a\u4e0b\u6587"),(0,c.kt)("h4",{id:"\u53c2\u6570-6"},"\u53c2\u6570"),(0,c.kt)("ul",null,(0,c.kt)("li",{parentName:"ul"},(0,c.kt)("inlineCode",{parentName:"li"},"config")," ",(0,c.kt)("a",{parentName:"li",href:"/QCefView/zh/docs/reference/QCefConfig#class_q_cef_config"},"QCefConfig")," \u5b9e\u4f8b")),(0,c.kt)("h4",{id:"\u8fd4\u56de\u503c-4"},"\u8fd4\u56de\u503c"),(0,c.kt)("p",null,"True \u4e3a\u6210\u529f; \u5176\u4ed6\u4e3a false"),(0,c.kt)("hr",null),(0,c.kt)("h3",{id:"class_q_cef_context_1aee74a7460786ddc17f8f9c0f68eaab6b"},(0,c.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,c.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1aee74a7460786ddc17f8f9c0f68eaab6b"},(0,c.kt)("inlineCode",{parentName:"a"},"uninit")),(0,c.kt)("inlineCode",{parentName:"h3"},"()")),(0,c.kt)("p",null,"\u53d6\u6d88\u521d\u59cb\u5316 CEF \u4e0a\u4e0b\u6587"),(0,c.kt)("hr",null),(0,c.kt)("h3",{id:"class_q_cef_context_1a502cdbb18c3abae014e6b8ee42948645"},(0,c.kt)("inlineCode",{parentName:"h3"},"private QScopedPointer< QCefContextPrivate > "),(0,c.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a502cdbb18c3abae014e6b8ee42948645"},(0,c.kt)("inlineCode",{parentName:"a"},"d_ptr"))),(0,c.kt)("hr",null),(0,c.kt)("h3",{id:"class_q_cef_context_1a3e6491f837fdd72c7b4fefed5569853b"},(0,c.kt)("inlineCode",{parentName:"h3"},"public static "),(0,c.kt)("a",{parentName:"h3",href:"#class_q_cef_context"},(0,c.kt)("inlineCode",{parentName:"a"},"QCefContext")),(0,c.kt)("inlineCode",{parentName:"h3"},"*"),(0,c.kt)("a",{parentName:"h3",href:"#class_q_cef_context_1a3e6491f837fdd72c7b4fefed5569853b"},(0,c.kt)("inlineCode",{parentName:"a"},"instance")),(0,c.kt)("inlineCode",{parentName:"h3"},"()")),(0,c.kt)("p",null,"\u83b7\u53d6\u552f\u4e00\u7684\u9ed8\u8ba4\u5b9e\u4f8b"),(0,c.kt)("h4",{id:"\u8fd4\u56de\u503c-5"},"\u8fd4\u56de\u503c"),(0,c.kt)("p",null,"\u9ed8\u8ba4\u5b9e\u4f8b"))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/zh/assets/js/4c071278.d53a07de.js b/zh/assets/js/4c071278.d53a07de.js new file mode 100644 index 00000000..723467c0 --- /dev/null +++ b/zh/assets/js/4c071278.d53a07de.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkqcefviewdoc=self.webpackChunkqcefviewdoc||[]).push([[340],{3905:(e,a,t)=>{t.d(a,{Zo:()=>p,kt:()=>m});var n=t(7294);function i(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function l(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var a=1;a=0||(i[t]=e[t]);return i}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var c=n.createContext({}),o=function(e){var a=n.useContext(c),t=a;return e&&(t="function"==typeof e?e(a):d(d({},a),e)),t},p=function(e){var a=o(e.components);return n.createElement(c.Provider,{value:a},e.children)},k="mdxType",f={inlineCode:"code",wrapper:function(e){var a=e.children;return n.createElement(n.Fragment,{},a)}},s=n.forwardRef((function(e,a){var t=e.components,i=e.mdxType,l=e.originalType,c=e.parentName,p=r(e,["components","mdxType","originalType","parentName"]),k=o(t),s=i,m=k["".concat(c,".").concat(s)]||k[s]||f[s]||l;return t?n.createElement(m,d(d({ref:a},p),{},{components:t})):n.createElement(m,d({ref:a},p))}));function m(e,a){var t=arguments,i=a&&a.mdxType;if("string"==typeof e||i){var l=t.length,d=new Array(l);d[0]=s;var r={};for(var c in a)hasOwnProperty.call(a,c)&&(r[c]=a[c]);r.originalType=e,r[k]="string"==typeof e?e:i,d[1]=r;for(var o=2;o{t.r(a),t.d(a,{assets:()=>c,contentTitle:()=>d,default:()=>f,frontMatter:()=>l,metadata:()=>r,toc:()=>o});var n=t(7462),i=(t(7294),t(3905));const l={title:"QCefView"},d="class QCefView",r={unversionedId:"reference/QCefView",id:"reference/QCefView",title:"QCefView",description:"classqcef_view}",source:"@site/i18n/zh/docusaurus-plugin-content-docs/current/reference/QCefView.md",sourceDirName:"reference",slug:"/reference/QCefView",permalink:"/QCefView/zh/docs/reference/QCefView",draft:!1,editUrl:"https://github.com/CefView/QCefViewDoc/tree/master/i18n/zh/docusaurus-plugin-content-docs/current/reference/QCefView.md",tags:[],version:"current",frontMatter:{title:"QCefView"},sidebar:"default",previous:{title:"QCefSetting",permalink:"/QCefView/zh/docs/reference/QCefSetting"},next:{title:"Web APIs",permalink:"/QCefView/zh/docs/reference/WebAPIs"}},c={},o=[{value:"\u603b\u7ed3",id:"\u603b\u7ed3",level:2},{value:"Members",id:"members",level:2},{value:"public QCefView(const QString url, const QCefSetting * setting, QWidget * parent, Qt::WindowFlags f)",id:"class_q_cef_view_1ad1e23ad619da083eefa20a14ba38a228",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570",level:4},{value:"public QCefView(QWidget * parent, Qt::WindowFlags f)",id:"class_q_cef_view_1a11c38eefb7b152dbf73620cb23922df0",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-1",level:4},{value:"public ~QCefView()",id:"class_q_cef_view_1a70903dca8ccd3e2776d68742531177fd",level:3},{value:"public void addLocalFolderResource(const QString & path, const QString & url, int priority)",id:"class_q_cef_view_1a8c6286b279094a691832fc89b93c75f1",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-2",level:4},{value:"public void addArchiveResource(const QString & path, const QString & url, const QString & password, int priority)",id:"class_q_cef_view_1a503148f8ff5ca5b28d3f0e123bf5bf76",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-3",level:4},{value:"public int browserId()",id:"class_q_cef_view_1ae4aa1652bf9852ed744dd38487bbb748",level:3},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c",level:4},{value:"public bool isPopup()",id:"class_q_cef_view_1a532ffb1fb0090dd866454234d518619c",level:3},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-1",level:4},{value:"public void navigateToString(const QString & content)",id:"class_q_cef_view_1ac3b8ec3b088422a67f93fc580047a1a0",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-4",level:4},{value:"public void navigateToUrl(const QString & url)",id:"class_q_cef_view_1a4bf036d5a7d128d4c1487afaa0393d5b",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-5",level:4},{value:"public bool browserCanGoBack()",id:"class_q_cef_view_1a01100f7ab97f9f643e4f23af5cea9900",level:3},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-2",level:4},{value:"public bool browserCanGoForward()",id:"class_q_cef_view_1ae1d6a6d94e02a54654463e5b0c491624",level:3},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-3",level:4},{value:"public void browserGoBack()",id:"class_q_cef_view_1aa82e1ceaa7f543f8d99d7d9cbf714382",level:3},{value:"public void browserGoForward()",id:"class_q_cef_view_1a9ce96fbf25701594b8d65381661141db",level:3},{value:"public bool browserIsLoading()",id:"class_q_cef_view_1a12ca0bc0f4fc55dfc838769990d6a6d7",level:3},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-4",level:4},{value:"public void browserReload()",id:"class_q_cef_view_1a45bc8cd7340ce410cf873d7296ffacf6",level:3},{value:"public void browserStopLoad()",id:"class_q_cef_view_1afadd210f3c5cd95598b18aa158a9c16f",level:3},{value:"public bool triggerEvent(const QCefEvent & event)",id:"class_q_cef_view_1ac47c23ffcd94bdffe2b6a81eaae077a2",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-6",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-5",level:4},{value:"public bool triggerEvent(const QCefEvent & event, qint64 frameId)",id:"class_q_cef_view_1ab6afab6f26fb1a1b4f3b25d2fe9c2f13",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-7",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-6",level:4},{value:"public bool broadcastEvent(const QCefEvent & event)",id:"class_q_cef_view_1ad5455e3a8cb0ffa1f9d7cb98307a6bb4",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-8",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-7",level:4},{value:"public bool responseQCefQuery(const QCefQuery & query)",id:"class_q_cef_view_1afc838dab54d2b083b05f0d98349b50cc",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-9",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-8",level:4},{value:"public bool executeJavascript(qint64 frameId, const QString & code, const QString & url)",id:"class_q_cef_view_1a79a5f1f466b1e8b96c89b24058194fe8",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-10",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-9",level:4},{value:"public bool executeJavascriptWithResult(qint64 frameId, const QString & code, const QString & url, qint64 context)",id:"class_q_cef_view_1ad4f331cdfc2ca2ed0ab019d2c8857065",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-11",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-10",level:4},{value:"public bool setPreference(const QString & name, const QVariant & value, const QString & error)",id:"class_q_cef_view_1a2b4b3da8874855bbe2d558081233d948",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-12",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-11",level:4},{value:"public void setDisablePopupContextMenu(bool disable)",id:"class_q_cef_view_1acca71443b26dce09e81e3f937cedaa6b",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-13",level:4},{value:"public bool isPopupContextMenuDisabled()",id:"class_q_cef_view_1abb79735affb74166c0bed7f361ce1388",level:3},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-12",level:4},{value:"public bool hasDevTools()",id:"class_q_cef_view_1a85fd904cbd3b91a72ce090cffb0119c8",level:3},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-13",level:4},{value:"public void showDevTools()",id:"class_q_cef_view_1a61845e6e370a57be5f3662ba37cd7b29",level:3},{value:"public void closeDevTools()",id:"class_q_cef_view_1abdf0a68139fe9163ecd9b5a0cdeed6d7",level:3},{value:"public void setEnableDragAndDrop(bool enable)",id:"class_q_cef_view_1af73ef1d6f77a31b528c729cf7379abfb",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-14",level:4},{value:"public bool isDragAndDropEnabled() const",id:"class_q_cef_view_1a2a8a2ebaedb88ccd80536c66d878ff8a",level:3},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-14",level:4},{value:"public void setFocus(Qt::FocusReason reason)",id:"class_q_cef_view_1a61ad737cd2354021f8310f323f4f8ada",level:3},{value:"public QVariant inputMethodQuery(Qt::InputMethodQuery query) const",id:"class_q_cef_view_1af25a011c126a9bb5dc3df99756a75368",level:3},{value:"protected virtual bool onBeforePopup(qint64 frameId, const QString & targetUrl, const QString & targetFrameName, QCefView::CefWindowOpenDispositiontargetDisposition, QRect & rect,QCefSetting & settings)",id:"class_q_cef_view_1a2889f3055a30625f39cecb697c15aa04",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-15",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-15",level:4},{value:"protected virtual void onNewDownloadItem(const QSharedPointer< QCefDownloadItem > & item, const QString & suggestedName)",id:"class_q_cef_view_1a666e93d6e9f9be7444f9b898f77c8292",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-16",level:4},{value:"protected virtual void onUpdateDownloadItem(const QSharedPointer< QCefDownloadItem > & item)",id:"class_q_cef_view_1a9833a1db8ef5864489f9462ef397cbb8",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-17",level:4},{value:"protected void paintEvent(QPaintEvent * event)",id:"class_q_cef_view_1aa205502bb5238e6e2ce727046ed8a9b8",level:3},{value:"protected void inputMethodEvent(QInputMethodEvent * event)",id:"class_q_cef_view_1a02d713f4a0545e85832b70ddced7e831",level:3},{value:"protected void showEvent(QShowEvent * event)",id:"class_q_cef_view_1a08dcba31e0d2860270ab3cd8055a5c4e",level:3},{value:"protected void hideEvent(QHideEvent * event)",id:"class_q_cef_view_1af2432e14ac8d9156594c3941ff6b4d14",level:3},{value:"protected void focusInEvent(QFocusEvent * event)",id:"class_q_cef_view_1a05bf10e1e318cf9cc4ad742ad61c9706",level:3},{value:"protected void focusOutEvent(QFocusEvent * event)",id:"class_q_cef_view_1a414b4c9efe5edd10c324c1e35e12d07c",level:3},{value:"protected void resizeEvent(QResizeEvent * event)",id:"class_q_cef_view_1a237797e9f77342d72c35a8017865988e",level:3},{value:"protected void keyPressEvent(QKeyEvent * event)",id:"class_q_cef_view_1a6aa89a0ce04dac5aa2c01545253ffc56",level:3},{value:"protected void keyReleaseEvent(QKeyEvent * event)",id:"class_q_cef_view_1ab2d8e99188937bba13893ce6c54f9a3f",level:3},{value:"protected void mouseMoveEvent(QMouseEvent * event)",id:"class_q_cef_view_1a3bd541e981d7dbad0deceb64df0d3a5b",level:3},{value:"protected void mousePressEvent(QMouseEvent * event)",id:"class_q_cef_view_1aac476c39493a4e75e681b9e09f13e060",level:3},{value:"protected void mouseReleaseEvent(QMouseEvent * event)",id:"class_q_cef_view_1a69306a82128ba3e525103eb132aae62c",level:3},{value:"protected void wheelEvent(QWheelEvent * event)",id:"class_q_cef_view_1a3395f62959288420a834c736933e7228",level:3},{value:"protected void contextMenuEvent(QContextMenuEvent * event)",id:"class_q_cef_view_1ac8a83d1f2fb0e771fb48007838b40d1f",level:3},{value:"{signal} public void loadingStateChanged(int browserId, bool isLoading, bool canGoBack, bool canGoForward)",id:"class_q_cef_view_1afb28155fd58760bd84cf45f634e054b5",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-18",level:4},{value:"{signal} public void loadStart(int browserId, qint64 frameId, bool isMainFrame, int transitionType)",id:"class_q_cef_view_1a0165da07749c09130e0007a4ceff59ca",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-19",level:4},{value:"{signal} public void loadEnd(int browserId, qint64 frameId, bool isMainFrame, int httpStatusCode)",id:"class_q_cef_view_1a5d64cbb95348336b85cb01f38de91e0a",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-20",level:4},{value:"{signal} public void loadError(int browserId, qint64 frameId, bool isMainFrame, int errorCode, const QString & errorMsg, const QString & failedUrl)",id:"class_q_cef_view_1a81ad0ea96d09d7ba705c4166502507e4",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-21",level:4},{value:"{signal} public void draggableRegionChanged(const QRegion & draggableRegion, const QRegion & nonDraggableRegion)",id:"class_q_cef_view_1ae11274817f627abf9d407e12dcd5c050",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-22",level:4},{value:"{signal} public void addressChanged(qint64 frameId, const QString & url)",id:"class_q_cef_view_1a89ce3bc031d5dcd1115482118a6c4181",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-23",level:4},{value:"{signal} public void titleChanged(const QString & title)",id:"class_q_cef_view_1a48c82c208cab769a1baa7177bc58b030",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-24",level:4},{value:"{signal} public void faviconURLChanged(const QStringList & urls)",id:"class_q_cef_view_1a7b9e104469c1a4a203c2e1d7e9cfd2a7",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-25",level:4},{value:"{signal} public void faviconChanged(const QIcon & icon)",id:"class_q_cef_view_1aa5d4a7098414f929a4ca7dd6b72d0893",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-26",level:4},{value:"{signal} public void fullscreenModeChanged(bool fullscreen)",id:"class_q_cef_view_1afa0fbb5b4c2c6c3592085e9b94dffc4a",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-27",level:4},{value:"{signal} public void statusMessage(const QString & message)",id:"class_q_cef_view_1a86d10c28b8821a36723e3504fa0cc7e7",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-28",level:4},{value:"{signal} public void consoleMessage(const QString & message, int level)",id:"class_q_cef_view_1a2dae6946082712815273c2967d37762a",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-29",level:4},{value:"{signal} public void loadingProgressChanged(double progress)",id:"class_q_cef_view_1ac7377eeed6811bafca1e6887b64d62a5",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-30",level:4},{value:"{signal} public void cefQueryRequest(int browserId, qint64 frameId, const QCefQuery & query)",id:"class_q_cef_view_1a9085b5e19ee6eb1306ec29e40f09c6e3",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-31",level:4},{value:"{signal} public void invokeMethod(int browserId, qint64 frameId, const QString & method, const QVariantList & arguments)",id:"class_q_cef_view_1a221d07818d4f6766f72c68319fecc24e",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-32",level:4},{value:"{signal} public void reportJavascriptResult(int browserId, qint64 frameId, qint64 context, const QVariant & result)",id:"class_q_cef_view_1a3e5b637b042a2d17946a884f9bfc9bf0",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-33",level:4},{value:"{signal} public void nativeBrowserCreated(QWindow * window)",id:"class_q_cef_view_1a543b0eca797c5161d6325665d5ddd576",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-34",level:4},{value:"{signal} public void popupCreated(QCefView * popup)",id:"class_q_cef_view_1ab008a40ecfdd9a616e31b401514ac1e3",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-35",level:4},{value:"{slot} public inline void setFocus()",id:"class_q_cef_view_1a9b1b42857e38a9f5c6c810fd51593788",level:3},{value:"enum CefWindowOpenDisposition",id:"class_q_cef_view_1a9963d810f8aa71b45b1b10f0abbe8787",level:3},{value:"private QScopedPointer< QCefViewPrivate > d_ptr",id:"class_q_cef_view_1a6882524bec20e1620311b3853750638f",level:3}],p={toc:o},k="wrapper";function f(e){let{components:a,...t}=e;return(0,i.kt)(k,(0,n.Z)({},p,t,{components:a,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"class_q_cef_view"},"class ",(0,i.kt)("inlineCode",{parentName:"h1"},"QCefView")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"class QCefView\n : public QWidget\n")),(0,i.kt)("p",null,"\u8868\u793a CEF \u6d4f\u89c8\u5668\u89c6\u56fe"),(0,i.kt)("h2",{id:"\u603b\u7ed3"},"\u603b\u7ed3"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"\u6210\u5458"),(0,i.kt)("th",{parentName:"tr",align:null},"\u63cf\u8ff0"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ad1e23ad619da083eefa20a14ba38a228"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefView")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString url, const "),(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefSetting#class_q_cef_setting"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefSetting")),(0,i.kt)("inlineCode",{parentName:"td"}," * setting, QWidget * parent, Qt::WindowFlags f)")),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view"},"QCefView")," \u6709\u53c2\u6784\u9020\u51fd\u6570")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a11c38eefb7b152dbf73620cb23922df0"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefView")),(0,i.kt)("inlineCode",{parentName:"td"},"(QWidget * parent, Qt::WindowFlags f)")),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view"},"QCefView")," \u6709\u53c2\u6784\u9020\u51fd\u6570")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a70903dca8ccd3e2776d68742531177fd"},(0,i.kt)("inlineCode",{parentName:"a"},"~QCefView")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view"},"QCefView")," \u6790\u6784\u51fd\u6570")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a8c6286b279094a691832fc89b93c75f1"},(0,i.kt)("inlineCode",{parentName:"a"},"addLocalFolderResource")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString & path, const QString & url, int priority)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u6dfb\u52a0\u5177\u6709\u672c\u5730 Web \u8d44\u6e90\u76ee\u5f55\u7684 url \u6620\u5c04\u9879")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a503148f8ff5ca5b28d3f0e123bf5bf76"},(0,i.kt)("inlineCode",{parentName:"a"},"addArchiveResource")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString & path, const QString & url, const QString & password, int priority)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u4f7f\u7528\u5305\u542b Web \u8d44\u6e90\u7684\u672c\u5730\u5b58\u6863 \uff08.zip\uff09 \u6587\u4ef6\u6dfb\u52a0 url \u6620\u5c04\u9879")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public int "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ae4aa1652bf9852ed744dd38487bbb748"},(0,i.kt)("inlineCode",{parentName:"a"},"browserId")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u83b7\u53d6\u6d4f\u89c8\u5668 ID")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a532ffb1fb0090dd866454234d518619c"},(0,i.kt)("inlineCode",{parentName:"a"},"isPopup")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u83b7\u53d6\u6d4f\u89c8\u5668\u662f\u5426\u521b\u5efa\u4e3a\u5f39\u51fa\u5f0f\u6d4f\u89c8\u5668")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ac3b8ec3b088422a67f93fc580047a1a0"},(0,i.kt)("inlineCode",{parentName:"a"},"navigateToString")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString & content)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5bfc\u822a\u5230\u5185\u5bb9")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a4bf036d5a7d128d4c1487afaa0393d5b"},(0,i.kt)("inlineCode",{parentName:"a"},"navigateToUrl")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString & url)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5bfc\u822a\u5230\u7f51\u5740")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a01100f7ab97f9f643e4f23af5cea9900"},(0,i.kt)("inlineCode",{parentName:"a"},"browserCanGoBack")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u68c0\u67e5\u6d4f\u89c8\u5668\u662f\u5426\u53ef\u4ee5\u8fd4\u56de")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ae1d6a6d94e02a54654463e5b0c491624"},(0,i.kt)("inlineCode",{parentName:"a"},"browserCanGoForward")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u68c0\u67e5\u6d4f\u89c8\u5668\u662f\u5426\u53ef\u4ee5\u524d\u8fdb")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1aa82e1ceaa7f543f8d99d7d9cbf714382"},(0,i.kt)("inlineCode",{parentName:"a"},"browserGoBack")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8981\u6c42\u6d4f\u89c8\u5668\u8fd4\u56de")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a9ce96fbf25701594b8d65381661141db"},(0,i.kt)("inlineCode",{parentName:"a"},"browserGoForward")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8981\u6c42\u6d4f\u89c8\u5668\u524d\u8fdb")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a12ca0bc0f4fc55dfc838769990d6a6d7"},(0,i.kt)("inlineCode",{parentName:"a"},"browserIsLoading")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u68c0\u67e5\u6d4f\u89c8\u5668\u662f\u5426\u6b63\u5728\u52a0\u8f7d")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a45bc8cd7340ce410cf873d7296ffacf6"},(0,i.kt)("inlineCode",{parentName:"a"},"browserReload")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8981\u6c42\u6d4f\u89c8\u5668\u91cd\u65b0\u52a0\u8f7d")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1afadd210f3c5cd95598b18aa158a9c16f"},(0,i.kt)("inlineCode",{parentName:"a"},"browserStopLoad")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8981\u6c42\u6d4f\u89c8\u5668\u505c\u6b62\u52a0\u8f7d")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ac47c23ffcd94bdffe2b6a81eaae077a2"},(0,i.kt)("inlineCode",{parentName:"a"},"triggerEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(const "),(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefEvent#class_q_cef_event"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefEvent")),(0,i.kt)("inlineCode",{parentName:"td"}," & event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u89e6\u53d1\u4e3b\u6846\u67b6\u7684\u4e8b\u4ef6")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ab6afab6f26fb1a1b4f3b25d2fe9c2f13"},(0,i.kt)("inlineCode",{parentName:"a"},"triggerEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(const "),(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefEvent#class_q_cef_event"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefEvent")),(0,i.kt)("inlineCode",{parentName:"td"}," & event, qint64 frameId)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u89e6\u53d1\u6307\u5b9aframe\u7684\u4e8b\u4ef6")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ad5455e3a8cb0ffa1f9d7cb98307a6bb4"},(0,i.kt)("inlineCode",{parentName:"a"},"broadcastEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(const "),(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefEvent#class_q_cef_event"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefEvent")),(0,i.kt)("inlineCode",{parentName:"td"}," & event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u4e3a\u6240\u6709frame\u5e7f\u64ad\u4e8b\u4ef6")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1afc838dab54d2b083b05f0d98349b50cc"},(0,i.kt)("inlineCode",{parentName:"a"},"responseQCefQuery")),(0,i.kt)("inlineCode",{parentName:"td"},"(const "),(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefQuery#class_q_cef_query"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefQuery")),(0,i.kt)("inlineCode",{parentName:"td"}," & query)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u54cd\u5e94 ",(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefQuery#class_q_cef_query"},"QCefQuery")," \u8bf7\u6c42")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a79a5f1f466b1e8b96c89b24058194fe8"},(0,i.kt)("inlineCode",{parentName:"a"},"executeJavascript")),(0,i.kt)("inlineCode",{parentName:"td"},"(qint64 frameId, const QString & code, const QString & url)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u6307\u5b9a\u7684frame\u4e2d\u6267\u884cjavascript\u4ee3\u7801\uff0c\u6b64\u65b9\u6cd5\u4e0d\u62a5\u544ajavascript\u7684\u7ed3\u679c\u3002\u8981\u83b7\u53d6 javascript \u6267\u884c\u7684\u7ed3\u679c\uff0c\u8bf7\u4f7f\u7528",(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ad4f331cdfc2ca2ed0ab019d2c8857065"},"executeJavascriptWithResult"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ad4f331cdfc2ca2ed0ab019d2c8857065"},(0,i.kt)("inlineCode",{parentName:"a"},"executeJavascriptWithResult")),(0,i.kt)("inlineCode",{parentName:"td"},"(qint64 frameId, const QString & code, const QString & url, qint64 context)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u6307\u5b9a\u7684frame\u4e2d\u6267\u884cjavascript\u4ee3\u7801\uff0c\u7ed3\u679c\u5c06\u901a\u8fc7",(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a3e5b637b042a2d17946a884f9bfc9bf0"},"reportJavascriptResult")," \u4fe1\u53f7\u53d1\u9001")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a2b4b3da8874855bbe2d558081233d948"},(0,i.kt)("inlineCode",{parentName:"a"},"setPreference")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString & name, const QVariant & value, const QString & error)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bbe\u7f6e\u6b64\u6d4f\u89c8\u5668\u7684\u9996\u9009\u9879")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1acca71443b26dce09e81e3f937cedaa6b"},(0,i.kt)("inlineCode",{parentName:"a"},"setDisablePopupContextMenu")),(0,i.kt)("inlineCode",{parentName:"td"},"(bool disable)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bbe\u7f6e\u662f\u5426\u7981\u7528\u5f39\u51fa\u6d4f\u89c8\u5668\u7684\u4e0a\u4e0b\u6587\u83dc\u5355")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1abb79735affb74166c0bed7f361ce1388"},(0,i.kt)("inlineCode",{parentName:"a"},"isPopupContextMenuDisabled")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u83b7\u53d6\u662f\u5426\u7981\u7528\u5f39\u51fa\u6d4f\u89c8\u5668\u7684\u4e0a\u4e0b\u6587\u83dc\u5355")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a85fd904cbd3b91a72ce090cffb0119c8"},(0,i.kt)("inlineCode",{parentName:"a"},"hasDevTools")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u68c0\u6d4b\u6b64\u6d4f\u89c8\u5668\u662f\u5426\u6253\u5f00\u4e86devtools")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a61845e6e370a57be5f3662ba37cd7b29"},(0,i.kt)("inlineCode",{parentName:"a"},"showDevTools")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u6253\u5f00 devtools \u5bf9\u8bdd\u6846")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1abdf0a68139fe9163ecd9b5a0cdeed6d7"},(0,i.kt)("inlineCode",{parentName:"a"},"closeDevTools")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5173\u95ed devtools \u5bf9\u8bdd\u6846")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1af73ef1d6f77a31b528c729cf7379abfb"},(0,i.kt)("inlineCode",{parentName:"a"},"setEnableDragAndDrop")),(0,i.kt)("inlineCode",{parentName:"td"},"(bool enable)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bbe\u7f6e\u662f\u5426\u542f\u7528\u62d6\u62fd")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a2a8a2ebaedb88ccd80536c66d878ff8a"},(0,i.kt)("inlineCode",{parentName:"a"},"isDragAndDropEnabled")),(0,i.kt)("inlineCode",{parentName:"td"},"() const")),(0,i.kt)("td",{parentName:"tr",align:null},"\u83b7\u53d6\u662f\u5426\u542f\u7528\u62d6\u62fd")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a61ad737cd2354021f8310f323f4f8ada"},(0,i.kt)("inlineCode",{parentName:"a"},"setFocus")),(0,i.kt)("inlineCode",{parentName:"td"},"(Qt::FocusReason reason)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::setFocus"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public QVariant "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1af25a011c126a9bb5dc3df99756a75368"},(0,i.kt)("inlineCode",{parentName:"a"},"inputMethodQuery")),(0,i.kt)("inlineCode",{parentName:"td"},"(Qt::InputMethodQuery query) const")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::inputMethodQuery"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected virtual bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a2889f3055a30625f39cecb697c15aa04"},(0,i.kt)("inlineCode",{parentName:"a"},"onBeforePopup")),(0,i.kt)("inlineCode",{parentName:"td"},"(qint64 frameId, const QString & targetUrl, const QString & targetFrameName, "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a9963d810f8aa71b45b1b10f0abbe8787"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefView::CefWindowOpenDisposition")),(0,i.kt)("inlineCode",{parentName:"td"},"targetDisposition, QRect & rect,"),(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefSetting#class_q_cef_setting"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefSetting")),(0,i.kt)("inlineCode",{parentName:"td"}," & settings)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u521b\u5efa\u5f39\u51fa\u5f0f\u6d4f\u89c8\u5668\u4e4b\u524d\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected virtual void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a666e93d6e9f9be7444f9b898f77c8292"},(0,i.kt)("inlineCode",{parentName:"a"},"onNewDownloadItem")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QSharedPointer< "),(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefDownloadItem#class_q_cef_download_item"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefDownloadItem")),(0,i.kt)("inlineCode",{parentName:"td"}," > & item, const QString & suggestedName)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u9700\u8981\u5bf9\u65b0\u4e0b\u8f7d\u9879\u7684\u8c03\u7528\u3002\u4fdd\u7559\u5bf9\u4e0b\u8f7d\u9879\u7684\u5f15\u7528\u5e76\u8c03\u7528 ",(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefDownloadItem#class_q_cef_download_item_1a315592aa53a2bf7bc8aea717195f5b43"},"QCefDownloadItem::start")," \u65b9\u6cd5\u4ee5\u5141\u8bb8\u5e76\u542f\u52a8\u4e0b\u8f7d\uff0c\u5ffd\u7565\u4e0b\u8f7d\u9879\u4ee5\u7981\u6b62\u4e0b\u8f7d")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected virtual void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a9833a1db8ef5864489f9462ef397cbb8"},(0,i.kt)("inlineCode",{parentName:"a"},"onUpdateDownloadItem")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QSharedPointer< "),(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefDownloadItem#class_q_cef_download_item"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefDownloadItem")),(0,i.kt)("inlineCode",{parentName:"td"}," > & item)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u66f4\u65b0\u4e0b\u8f7d\u9879\u65f6\u8c03\u7528\u3002 \u82e5\u8981\u83b7\u53d6",(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefDownloadItem#class_q_cef_download_item_1a315592aa53a2bf7bc8aea717195f5b43"},"QCefDownloadItem::start"),"\u7684\u65b9\u6cd5\uff0c\u5fc5\u987b\u5728 newDownloadItem \u65b9\u6cd5\u4e2d\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1aa205502bb5238e6e2ce727046ed8a9b8"},(0,i.kt)("inlineCode",{parentName:"a"},"paintEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QPaintEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::paintEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a02d713f4a0545e85832b70ddced7e831"},(0,i.kt)("inlineCode",{parentName:"a"},"inputMethodEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QInputMethodEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::inputMethodEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a08dcba31e0d2860270ab3cd8055a5c4e"},(0,i.kt)("inlineCode",{parentName:"a"},"showEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QShowEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::showEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1af2432e14ac8d9156594c3941ff6b4d14"},(0,i.kt)("inlineCode",{parentName:"a"},"hideEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QHideEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::hideEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a05bf10e1e318cf9cc4ad742ad61c9706"},(0,i.kt)("inlineCode",{parentName:"a"},"focusInEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QFocusEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::focusInEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a414b4c9efe5edd10c324c1e35e12d07c"},(0,i.kt)("inlineCode",{parentName:"a"},"focusOutEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QFocusEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::focusOutEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a237797e9f77342d72c35a8017865988e"},(0,i.kt)("inlineCode",{parentName:"a"},"resizeEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QResizeEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::resizeEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a6aa89a0ce04dac5aa2c01545253ffc56"},(0,i.kt)("inlineCode",{parentName:"a"},"keyPressEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QKeyEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::keyPressEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ab2d8e99188937bba13893ce6c54f9a3f"},(0,i.kt)("inlineCode",{parentName:"a"},"keyReleaseEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QKeyEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::keyReleaseEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a3bd541e981d7dbad0deceb64df0d3a5b"},(0,i.kt)("inlineCode",{parentName:"a"},"mouseMoveEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QMouseEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::mouseMoveEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1aac476c39493a4e75e681b9e09f13e060"},(0,i.kt)("inlineCode",{parentName:"a"},"mousePressEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QMouseEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::mousePressEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a69306a82128ba3e525103eb132aae62c"},(0,i.kt)("inlineCode",{parentName:"a"},"mouseReleaseEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QMouseEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::mouseReleaseEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a3395f62959288420a834c736933e7228"},(0,i.kt)("inlineCode",{parentName:"a"},"wheelEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QWheelEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::wheelEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ac8a83d1f2fb0e771fb48007838b40d1f"},(0,i.kt)("inlineCode",{parentName:"a"},"contextMenuEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QContextMenuEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::contextMenuEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1afb28155fd58760bd84cf45f634e054b5"},(0,i.kt)("inlineCode",{parentName:"a"},"loadingStateChanged")),(0,i.kt)("inlineCode",{parentName:"td"},"(int browserId, bool isLoading, bool canGoBack, bool canGoForward)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u52a0\u8f7d\u72b6\u6001\u66f4\u6539\u65f6\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a0165da07749c09130e0007a4ceff59ca"},(0,i.kt)("inlineCode",{parentName:"a"},"loadStart")),(0,i.kt)("inlineCode",{parentName:"td"},"(int browserId, qint64 frameId, bool isMainFrame, int transition_type)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u52a0\u8f7d\u5f00\u59cb\u65f6\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a5d64cbb95348336b85cb01f38de91e0a"},(0,i.kt)("inlineCode",{parentName:"a"},"loadEnd")),(0,i.kt)("inlineCode",{parentName:"td"},"(int browserId, qint64 frameId, bool isMainFrame, int httpStatusCode)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u52a0\u8f7d\u7ed3\u675f\u65f6\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a81ad0ea96d09d7ba705c4166502507e4"},(0,i.kt)("inlineCode",{parentName:"a"},"loadError")),(0,i.kt)("inlineCode",{parentName:"td"},"(int browserId, qint64 frameId, bool isMainFrame, int errorCode, const QString & errorMsg, const QString & failedUrl)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u7531\u4e8e\u9519\u8bef\u5bfc\u81f4\u52a0\u8f7d\u5931\u8d25\u65f6\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ae11274817f627abf9d407e12dcd5c050"},(0,i.kt)("inlineCode",{parentName:"a"},"draggableRegionChanged")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QRegion & draggableRegion, const QRegion & nonDraggableRegion)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u53ef\u62d6\u52a8\u533a\u57df\u66f4\u6539\u65f6\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a89ce3bc031d5dcd1115482118a6c4181"},(0,i.kt)("inlineCode",{parentName:"a"},"addressChanged")),(0,i.kt)("inlineCode",{parentName:"td"},"(qint64 frameId, const QString & url)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u7f51\u5740\u66f4\u6539\u65f6\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a48c82c208cab769a1baa7177bc58b030"},(0,i.kt)("inlineCode",{parentName:"a"},"titleChanged")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString & title)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u7f51\u7ad9\u6807\u9898\u66f4\u6539\u65f6\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a7b9e104469c1a4a203c2e1d7e9cfd2a7"},(0,i.kt)("inlineCode",{parentName:"a"},"faviconURLChanged")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QStringList & urls)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u7f51\u7ad9\u56fe\u6807\u5730\u5740\u66f4\u6539\u65f6\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1aa5d4a7098414f929a4ca7dd6b72d0893"},(0,i.kt)("inlineCode",{parentName:"a"},"faviconChanged")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QIcon & icon)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u7f51\u7ad9\u56fe\u6807\u66f4\u6539\u65f6\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1afa0fbb5b4c2c6c3592085e9b94dffc4a"},(0,i.kt)("inlineCode",{parentName:"a"},"fullscreenModeChanged")),(0,i.kt)("inlineCode",{parentName:"td"},"(bool fullscreen)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u5168\u5c4f\u6a21\u5f0f\u66f4\u6539\u65f6\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a86d10c28b8821a36723e3504fa0cc7e7"},(0,i.kt)("inlineCode",{parentName:"a"},"statusMessage")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString & message)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u72b6\u6001\u6d88\u606f\u66f4\u6539\u65f6\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a2dae6946082712815273c2967d37762a"},(0,i.kt)("inlineCode",{parentName:"a"},"consoleMessage")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString & message, int level)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u4ece Web \u5185\u5bb9\u8c03\u7528\u63a7\u5236\u53f0\u6d88\u606f")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ac7377eeed6811bafca1e6887b64d62a5"},(0,i.kt)("inlineCode",{parentName:"a"},"loadingProgressChanged")),(0,i.kt)("inlineCode",{parentName:"td"},"(double progress)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u52a0\u8f7d\u8fdb\u5ea6\u66f4\u6539\u65f6\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a9085b5e19ee6eb1306ec29e40f09c6e3"},(0,i.kt)("inlineCode",{parentName:"a"},"cefQueryRequest")),(0,i.kt)("inlineCode",{parentName:"td"},"(int browserId, qint64 frameId, const "),(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefQuery#class_q_cef_query"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefQuery")),(0,i.kt)("inlineCode",{parentName:"td"}," & query)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u65b0\u7684 ",(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefQuery#class_q_cef_query"},"QCefQuery")," \u8bf7\u6c42\u4e0a\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a221d07818d4f6766f72c68319fecc24e"},(0,i.kt)("inlineCode",{parentName:"a"},"invokeMethod")),(0,i.kt)("inlineCode",{parentName:"td"},"(int browserId, qint64 frameId, const QString & method, const QVariantList & arguments)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u4ece Web \u5185\u5bb9\u8c03\u7528\u65b9\u6cd5\u8bf7\u6c42\u65f6\u8c03\u7528\uff08Javascript\uff09")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a3e5b637b042a2d17946a884f9bfc9bf0"},(0,i.kt)("inlineCode",{parentName:"a"},"reportJavascriptResult")),(0,i.kt)("inlineCode",{parentName:"td"},"(int browserId, qint64 frameId, qint64 context, const QVariant & result)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5bf9\u4f7f\u7528 ",(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ad4f331cdfc2ca2ed0ab019d2c8857065"},"executeJavascriptWithResult")," \u6267\u884c\u7684 javascript \u7684\u7ed3\u679c\u8fdb\u884c\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a543b0eca797c5161d6325665d5ddd576"},(0,i.kt)("inlineCode",{parentName:"a"},"nativeBrowserCreated")),(0,i.kt)("inlineCode",{parentName:"td"},"(QWindow * window)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u521b\u5efa\u539f\u751f\u6d4f\u89c8\u5668\u7a97\u53e3\u540e\u8c03\u7528\u3002\u4e0d\u9002\u7528\u4e8e OSR \u6a21\u5f0f\u3002")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ab008a40ecfdd9a616e31b401514ac1e3"},(0,i.kt)("inlineCode",{parentName:"a"},"popupCreated")),(0,i.kt)("inlineCode",{parentName:"td"},"("),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefView")),(0,i.kt)("inlineCode",{parentName:"td"}," * popup)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u521b\u5efa\u5f39\u51fa\u5f0f\u6d4f\u89c8\u5668\u540e\u7acb\u5373\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{slot} public inline void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a9b1b42857e38a9f5c6c810fd51593788"},(0,i.kt)("inlineCode",{parentName:"a"},"setFocus")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::setFocus"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"enum "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a9963d810f8aa71b45b1b10f0abbe8787"},(0,i.kt)("inlineCode",{parentName:"a"},"CefWindowOpenDisposition"))),(0,i.kt)("td",{parentName:"tr",align:null},"\u8868\u793a CEF \u5f39\u51fa\u7a97\u53e3\u7684\u6253\u5f00\u914d\u7f6e")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"private QScopedPointer< QCefViewPrivate > "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a6882524bec20e1620311b3853750638f"},(0,i.kt)("inlineCode",{parentName:"a"},"d_ptr"))),(0,i.kt)("td",{parentName:"tr",align:null})))),(0,i.kt)("h2",{id:"members"},"Members"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ad1e23ad619da083eefa20a14ba38a228"},(0,i.kt)("inlineCode",{parentName:"h3"},"public "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ad1e23ad619da083eefa20a14ba38a228"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefView")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString url, const "),(0,i.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefSetting#class_q_cef_setting"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefSetting")),(0,i.kt)("inlineCode",{parentName:"h3"}," * setting, QWidget * parent, Qt::WindowFlags f)")),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"#class_q_cef_view"},"QCefView")," \u6709\u53c2\u6784\u9020\u51fd\u6570"),(0,i.kt)("h4",{id:"\u53c2\u6570"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"url")," \u76ee\u6807\u7f51\u5740")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"setting")," ",(0,i.kt)("a",{parentName:"p",href:"/QCefView/zh/docs/reference/QCefSetting#class_q_cef_setting"},"QCefSetting")," \u5b9e\u4f8b")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"parent")," \u7236\u5bf9\u8c61"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a11c38eefb7b152dbf73620cb23922df0"},(0,i.kt)("inlineCode",{parentName:"h3"},"public "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a11c38eefb7b152dbf73620cb23922df0"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefView")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QWidget * parent, Qt::WindowFlags f)")),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"#class_q_cef_view"},"QCefView")," \u6709\u53c2\u6784\u9020\u51fd\u6570"),(0,i.kt)("h4",{id:"\u53c2\u6570-1"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"parent")," \u7236\u5bf9\u8c61")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a70903dca8ccd3e2776d68742531177fd"},(0,i.kt)("inlineCode",{parentName:"h3"},"public "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a70903dca8ccd3e2776d68742531177fd"},(0,i.kt)("inlineCode",{parentName:"a"},"~QCefView")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"#class_q_cef_view"},"QCefView")," \u6790\u6784\u51fd\u6570"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a8c6286b279094a691832fc89b93c75f1"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a8c6286b279094a691832fc89b93c75f1"},(0,i.kt)("inlineCode",{parentName:"a"},"addLocalFolderResource")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString & path, const QString & url, int priority)")),(0,i.kt)("p",null,"\u6dfb\u52a0\u5177\u6709\u672c\u5730 Web \u8d44\u6e90\u76ee\u5f55\u7684 url \u6620\u5c04\u9879"),(0,i.kt)("h4",{id:"\u53c2\u6570-2"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"path")," \u672c\u5730\u8d44\u6e90\u76ee\u5f55\u7684\u8def\u5f84")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"url")," \u8981\u6620\u5c04\u5230\u7684\u7f51\u5740")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"priority")," \u4f18\u5148\u7ea7"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a503148f8ff5ca5b28d3f0e123bf5bf76"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a503148f8ff5ca5b28d3f0e123bf5bf76"},(0,i.kt)("inlineCode",{parentName:"a"},"addArchiveResource")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString & path, const QString & url, const QString & password, int priority)")),(0,i.kt)("p",null,"\u4f7f\u7528\u5305\u542b Web \u8d44\u6e90\u7684\u672c\u5730\u5b58\u6863 \uff08.zip\uff09 \u6587\u4ef6\u6dfb\u52a0 url \u6620\u5c04\u9879"),(0,i.kt)("h4",{id:"\u53c2\u6570-3"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"path")," \u672c\u5730\u5b58\u6863\u6587\u4ef6\u7684\u8def\u5f84")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"url")," \u8981\u6620\u5c04\u5230\u7684\u7f51\u5740")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"password")," \u5b58\u6863\u7684\u5bc6\u7801")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"priority")," \u4f18\u5148\u7ea7"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ae4aa1652bf9852ed744dd38487bbb748"},(0,i.kt)("inlineCode",{parentName:"h3"},"public int "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ae4aa1652bf9852ed744dd38487bbb748"},(0,i.kt)("inlineCode",{parentName:"a"},"browserId")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u83b7\u53d6\u6d4f\u89c8\u5668 ID"),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u6d4f\u89c8\u5668 ID \u6807\u8bc6"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a532ffb1fb0090dd866454234d518619c"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a532ffb1fb0090dd866454234d518619c"},(0,i.kt)("inlineCode",{parentName:"a"},"isPopup")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u83b7\u53d6\u6d4f\u89c8\u5668\u662f\u5426\u521b\u5efa\u4e3a\u5f39\u51fa\u5f0f\u6d4f\u89c8\u5668"),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-1"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u5982\u679c\u662f\u5f39\u51fa\u5f0f\u6d4f\u89c8\u5668\uff0c\u5219\u4e3a true;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ac3b8ec3b088422a67f93fc580047a1a0"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ac3b8ec3b088422a67f93fc580047a1a0"},(0,i.kt)("inlineCode",{parentName:"a"},"navigateToString")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString & content)")),(0,i.kt)("p",null,"\u5bfc\u822a\u5230\u5185\u5bb9"),(0,i.kt)("h4",{id:"\u53c2\u6570-4"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"content")," \u5185\u5bb9")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a4bf036d5a7d128d4c1487afaa0393d5b"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a4bf036d5a7d128d4c1487afaa0393d5b"},(0,i.kt)("inlineCode",{parentName:"a"},"navigateToUrl")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString & url)")),(0,i.kt)("p",null,"\u5bfc\u822a\u5230\u7f51\u5740"),(0,i.kt)("h4",{id:"\u53c2\u6570-5"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"url")," \u7f51\u5740")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a01100f7ab97f9f643e4f23af5cea9900"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a01100f7ab97f9f643e4f23af5cea9900"},(0,i.kt)("inlineCode",{parentName:"a"},"browserCanGoBack")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u68c0\u67e5\u6d4f\u89c8\u5668\u662f\u5426\u53ef\u4ee5\u8fd4\u56de"),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-2"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u5982\u679c\u53ef\u4ee5\uff0c\u5219\u4e3atrue;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ae1d6a6d94e02a54654463e5b0c491624"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ae1d6a6d94e02a54654463e5b0c491624"},(0,i.kt)("inlineCode",{parentName:"a"},"browserCanGoForward")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u68c0\u67e5\u6d4f\u89c8\u5668\u662f\u5426\u53ef\u4ee5\u524d\u8fdb"),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-3"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u5982\u679c\u53ef\u4ee5\uff0c\u5219\u4e3atrue;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1aa82e1ceaa7f543f8d99d7d9cbf714382"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1aa82e1ceaa7f543f8d99d7d9cbf714382"},(0,i.kt)("inlineCode",{parentName:"a"},"browserGoBack")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u8981\u6c42\u6d4f\u89c8\u5668\u8fd4\u56de"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a9ce96fbf25701594b8d65381661141db"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a9ce96fbf25701594b8d65381661141db"},(0,i.kt)("inlineCode",{parentName:"a"},"browserGoForward")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u8981\u6c42\u6d4f\u89c8\u5668\u524d\u8fdb"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a12ca0bc0f4fc55dfc838769990d6a6d7"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a12ca0bc0f4fc55dfc838769990d6a6d7"},(0,i.kt)("inlineCode",{parentName:"a"},"browserIsLoading")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u68c0\u67e5\u6d4f\u89c8\u5668\u662f\u5426\u6b63\u5728\u52a0\u8f7d"),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-4"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u5982\u679c\u6b63\u5728\u52a0\u8f7d\uff0c\u5219\u4e3a true;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a45bc8cd7340ce410cf873d7296ffacf6"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a45bc8cd7340ce410cf873d7296ffacf6"},(0,i.kt)("inlineCode",{parentName:"a"},"browserReload")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u8981\u6c42\u6d4f\u89c8\u5668\u91cd\u65b0\u52a0\u8f7d"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1afadd210f3c5cd95598b18aa158a9c16f"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1afadd210f3c5cd95598b18aa158a9c16f"},(0,i.kt)("inlineCode",{parentName:"a"},"browserStopLoad")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u8981\u6c42\u6d4f\u89c8\u5668\u505c\u6b62\u52a0\u8f7d"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ac47c23ffcd94bdffe2b6a81eaae077a2"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ac47c23ffcd94bdffe2b6a81eaae077a2"},(0,i.kt)("inlineCode",{parentName:"a"},"triggerEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const "),(0,i.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefEvent#class_q_cef_event"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefEvent")),(0,i.kt)("inlineCode",{parentName:"h3"}," & event)")),(0,i.kt)("p",null,"\u89e6\u53d1\u4e3b\u6846\u67b6\u7684\u4e8b\u4ef6"),(0,i.kt)("h4",{id:"\u53c2\u6570-6"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"event")," ",(0,i.kt)("a",{parentName:"li",href:"/QCefView/zh/docs/reference/QCefEvent#class_q_cef_event"},"QCefEvent")," \u5b9e\u4f8b")),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-5"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u6210\u529f\u65f6\u4e3atrue;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ab6afab6f26fb1a1b4f3b25d2fe9c2f13"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ab6afab6f26fb1a1b4f3b25d2fe9c2f13"},(0,i.kt)("inlineCode",{parentName:"a"},"triggerEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const "),(0,i.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefEvent#class_q_cef_event"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefEvent")),(0,i.kt)("inlineCode",{parentName:"h3"}," & event, qint64 frameId)")),(0,i.kt)("p",null,"\u89e6\u53d1\u6307\u5b9aframe\u7684\u4e8b\u4ef6"),(0,i.kt)("h4",{id:"\u53c2\u6570-7"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"event")," The ",(0,i.kt)("a",{parentName:"p",href:"/QCefView/zh/docs/reference/QCefEvent#class_q_cef_event"},"QCefEvent")," instance")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," frame ID"))),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-6"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u6210\u529f\u65f6\u4e3atrue;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ad5455e3a8cb0ffa1f9d7cb98307a6bb4"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ad5455e3a8cb0ffa1f9d7cb98307a6bb4"},(0,i.kt)("inlineCode",{parentName:"a"},"broadcastEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const "),(0,i.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefEvent#class_q_cef_event"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefEvent")),(0,i.kt)("inlineCode",{parentName:"h3"}," & event)")),(0,i.kt)("p",null,"\u4e3a\u6240\u6709frame\u5e7f\u64ad\u4e8b\u4ef6"),(0,i.kt)("h4",{id:"\u53c2\u6570-8"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"event")," ",(0,i.kt)("a",{parentName:"li",href:"/QCefView/zh/docs/reference/QCefEvent#class_q_cef_event"},"QCefEvent")," \u5b9e\u4f8b")),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-7"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u6210\u529f\u65f6\u4e3atrue;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1afc838dab54d2b083b05f0d98349b50cc"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1afc838dab54d2b083b05f0d98349b50cc"},(0,i.kt)("inlineCode",{parentName:"a"},"responseQCefQuery")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const "),(0,i.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefQuery#class_q_cef_query"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefQuery")),(0,i.kt)("inlineCode",{parentName:"h3"}," & query)")),(0,i.kt)("p",null,"\u54cd\u5e94 ",(0,i.kt)("a",{parentName:"p",href:"/QCefView/zh/docs/reference/QCefQuery#class_q_cef_query"},"QCefQuery")," \u8bf7\u6c42"),(0,i.kt)("h4",{id:"\u53c2\u6570-9"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"query")," ",(0,i.kt)("a",{parentName:"li",href:"/QCefView/zh/docs/reference/QCefQuery#class_q_cef_query"},"QCefQuery")," \u5b9e\u4f8b")),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-8"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u6210\u529f\u65f6\u4e3atrue;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a79a5f1f466b1e8b96c89b24058194fe8"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a79a5f1f466b1e8b96c89b24058194fe8"},(0,i.kt)("inlineCode",{parentName:"a"},"executeJavascript")),(0,i.kt)("inlineCode",{parentName:"h3"},"(qint64 frameId, const QString & code, const QString & url)")),(0,i.kt)("p",null,"\u5728\u6307\u5b9a\u7684frame\u4e2d\u6267\u884cjavascript\u4ee3\u7801\uff0c\u6b64\u65b9\u6cd5\u4e0d\u62a5\u544ajavascript\u7684\u7ed3\u679c\u3002\u8981\u83b7\u53d6 javascript \u6267\u884c\u7684\u7ed3\u679c\uff0c\u8bf7\u4f7f\u7528 ",(0,i.kt)("a",{parentName:"p",href:"#class_q_cef_view_1ad4f331cdfc2ca2ed0ab019d2c8857065"},"executeJavascriptWithResult")),(0,i.kt)("h4",{id:"\u53c2\u6570-10"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," frame ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"code")," JavaScript\u4ee3\u7801")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"url")," \u53ef\u5728\u5176\u4e2d\u627e\u5230\u76f8\u5173\u811a\u672c\u7684 URL\uff08\u5982\u679c\u6709\uff09\u3002\u6e32\u67d3\u5668\u53ef\u80fd\u4f1a\u8bf7\u6c42\u6b64 URL \u4ee5\u5411\u5f00\u53d1\u4eba\u5458\u663e\u793a\u9519\u8bef\u7684\u6765\u6e90"))),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-9"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u6210\u529f\u65f6\u4e3atrue;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ad4f331cdfc2ca2ed0ab019d2c8857065"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ad4f331cdfc2ca2ed0ab019d2c8857065"},(0,i.kt)("inlineCode",{parentName:"a"},"executeJavascriptWithResult")),(0,i.kt)("inlineCode",{parentName:"h3"},"(qint64 frameId, const QString & code, const QString & url, qint64 context)")),(0,i.kt)("p",null,"\u5728\u6307\u5b9a\u7684frame\u4e2d\u6267\u884cjavascript\u4ee3\u7801\uff0c\u7ed3\u679c\u5c06\u901a\u8fc7 ",(0,i.kt)("a",{parentName:"p",href:"#class_q_cef_view_1a3e5b637b042a2d17946a884f9bfc9bf0"},"reportJavascriptResult")," \u4fe1\u53f7\u53d1\u9001"),(0,i.kt)("h4",{id:"\u53c2\u6570-11"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," frame ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"code")," JavaScript \u4ee3\u7801")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"url")," \u53ef\u5728\u5176\u4e2d\u627e\u5230\u76f8\u5173\u811a\u672c\u7684 URL\uff08\u5982\u679c\u6709\uff09\u3002\u6e32\u67d3\u5668\u53ef\u80fd\u4f1a\u8bf7\u6c42\u6b64 URL \u4ee5\u5411\u5f00\u53d1\u4eba\u5458\u663e\u793a\u9519\u8bef\u7684\u6765\u6e90")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"context")," \u7528\u4e8e\u6807\u8bc6\u4e00\u4e2a\u6267\u884c\u7684\u4e0a\u4e0b\u6587"))),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-10"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u6210\u529f\u65f6\u4e3atrue;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a2b4b3da8874855bbe2d558081233d948"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a2b4b3da8874855bbe2d558081233d948"},(0,i.kt)("inlineCode",{parentName:"a"},"setPreference")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString & name, const QVariant & value, const QString & error)")),(0,i.kt)("p",null,"\u8bbe\u7f6e\u6b64\u6d4f\u89c8\u5668\u7684\u9996\u9009\u9879"),(0,i.kt)("h4",{id:"\u53c2\u6570-12"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"name")," \u9996\u9009\u9879\u540d\u79f0"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"value")," \u9996\u9009\u9879\u503c\uff0c\u5982\u679c\u6b64\u503c\u4e3a ",(0,i.kt)("inlineCode",{parentName:"li"},"QVariant::UnknownType")," \u6216\u8005 ",(0,i.kt)("inlineCode",{parentName:"li"},"QVariant::Invalid"),", \u5219\u9996\u9009\u9879\u5c06\u6062\u590d\u4e3a\u9ed8\u8ba4\u503c"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"error")," \u5931\u8d25\u65f6\u586b\u5145\u7684\u9519\u8bef\u6d88\u606f")),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-11"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u6210\u529f\u65f6\u4e3atrue;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1acca71443b26dce09e81e3f937cedaa6b"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1acca71443b26dce09e81e3f937cedaa6b"},(0,i.kt)("inlineCode",{parentName:"a"},"setDisablePopupContextMenu")),(0,i.kt)("inlineCode",{parentName:"h3"},"(bool disable)")),(0,i.kt)("p",null,"\u8bbe\u7f6e\u662f\u5426\u7981\u7528\u5f39\u51fa\u6d4f\u89c8\u5668\u7684\u4e0a\u4e0b\u6587\u83dc\u5355"),(0,i.kt)("h4",{id:"\u53c2\u6570-13"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"disable")," True \u8868\u793a\u7981\u7528;false \u8868\u793a\u542f\u7528")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1abb79735affb74166c0bed7f361ce1388"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1abb79735affb74166c0bed7f361ce1388"},(0,i.kt)("inlineCode",{parentName:"a"},"isPopupContextMenuDisabled")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null," \u83b7\u53d6\u662f\u5426\u7981\u7528\u5f39\u51fa\u6d4f\u89c8\u5668\u7684\u4e0a\u4e0b\u6587\u83dc\u5355"),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-12"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"True \u8868\u793a\u7981\u7528;false \u8868\u793a\u542f\u7528"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a85fd904cbd3b91a72ce090cffb0119c8"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a85fd904cbd3b91a72ce090cffb0119c8"},(0,i.kt)("inlineCode",{parentName:"a"},"hasDevTools")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u68c0\u6d4b\u6b64\u6d4f\u89c8\u5668\u662f\u5426\u6253\u5f00\u4e86devtools"),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-13"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u5982\u679c\u5df2\u7ecf\u6253\u5f00\uff0c\u5219\u4e3a true; \u5426\u5219\u4e3a false"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a61845e6e370a57be5f3662ba37cd7b29"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a61845e6e370a57be5f3662ba37cd7b29"},(0,i.kt)("inlineCode",{parentName:"a"},"showDevTools")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u6253\u5f00 devtools \u5bf9\u8bdd\u6846"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1abdf0a68139fe9163ecd9b5a0cdeed6d7"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1abdf0a68139fe9163ecd9b5a0cdeed6d7"},(0,i.kt)("inlineCode",{parentName:"a"},"closeDevTools")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u5173\u95ed devtools \u5bf9\u8bdd\u6846"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1af73ef1d6f77a31b528c729cf7379abfb"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1af73ef1d6f77a31b528c729cf7379abfb"},(0,i.kt)("inlineCode",{parentName:"a"},"setEnableDragAndDrop")),(0,i.kt)("inlineCode",{parentName:"h3"},"(bool enable)")),(0,i.kt)("p",null,"\u8bbe\u7f6e\u662f\u5426\u542f\u7528\u62d6\u62fd"),(0,i.kt)("h4",{id:"\u53c2\u6570-14"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"enable")," True \u8868\u793a\u542f\u7528;false \u8868\u793a\u7981\u7528")),(0,i.kt)("p",null,"\u4e0d\u9002\u7528\u4e8eOSR\u6a21\u5f0f\u3002\u6ce8\u610f\u8fd9\u91cc\u6709\u4e00\u4e2a\u95ee\u9898\uff0c\u5f53\u5c06\u6587\u4ef6\u62d6\u52a8\u5230\u975e\u62d6\u52a8\u533a\u57df\u65f6\uff0c\u5c06\u663e\u793a\u8be5\u6587\u4ef6\u7684\u5185\u5bb9\u3002\u4f60\u9700\u8981\u81ea\u5df1\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a2a8a2ebaedb88ccd80536c66d878ff8a"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a2a8a2ebaedb88ccd80536c66d878ff8a"},(0,i.kt)("inlineCode",{parentName:"a"},"isDragAndDropEnabled")),(0,i.kt)("inlineCode",{parentName:"h3"},"() const")),(0,i.kt)("p",null,"\u83b7\u53d6\u662f\u5426\u542f\u7528\u62d6\u62fd"),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-14"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"True \u8868\u793a\u542f\u7528;false \u8868\u793a\u7981\u7528"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a61ad737cd2354021f8310f323f4f8ada"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a61ad737cd2354021f8310f323f4f8ada"},(0,i.kt)("inlineCode",{parentName:"a"},"setFocus")),(0,i.kt)("inlineCode",{parentName:"h3"},"(Qt::FocusReason reason)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"p"},"QWidget::setFocus")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1af25a011c126a9bb5dc3df99756a75368"},(0,i.kt)("inlineCode",{parentName:"h3"},"public QVariant "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1af25a011c126a9bb5dc3df99756a75368"},(0,i.kt)("inlineCode",{parentName:"a"},"inputMethodQuery")),(0,i.kt)("inlineCode",{parentName:"h3"},"(Qt::InputMethodQuery query) const")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::inputMethodQuery"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a2889f3055a30625f39cecb697c15aa04"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected virtual bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a2889f3055a30625f39cecb697c15aa04"},(0,i.kt)("inlineCode",{parentName:"a"},"onBeforePopup")),(0,i.kt)("inlineCode",{parentName:"h3"},"(qint64 frameId, const QString & targetUrl, const QString & targetFrameName, "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a9963d810f8aa71b45b1b10f0abbe8787"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefView::CefWindowOpenDisposition")),(0,i.kt)("inlineCode",{parentName:"h3"},"targetDisposition, QRect & rect,"),(0,i.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefSetting#class_q_cef_setting"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefSetting")),(0,i.kt)("inlineCode",{parentName:"h3"}," & settings)")),(0,i.kt)("p",null," \u5728\u521b\u5efa\u5f39\u51fa\u5f0f\u6d4f\u89c8\u5668\u4e4b\u524d\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-15"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," \u6e90frame ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"targetUrl")," \u76ee\u6807\u7f51\u5740")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"targetFrameName")," \u76ee\u6807\u540d\u79f0")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"targetDisposition")," \u76ee\u6807\u7a97\u53e3\u6253\u5f00\u65b9\u6cd5")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"settings")," \u7528\u4e8e\u5f39\u51fa\u7a97\u53e3\u7684\u8bbe\u7f6e")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"rect")," \u7528\u4e8e\u5f39\u51fa\u7a97\u53e3\u7684\u77e9\u5f62"))),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-15"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u5982\u679c\u4e3a true\uff0c\u5219\u53d6\u6d88\u5f39\u51fa\u7a97\u53e3;false\u8868\u793a\u5141\u8bb8"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a666e93d6e9f9be7444f9b898f77c8292"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected virtual void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a666e93d6e9f9be7444f9b898f77c8292"},(0,i.kt)("inlineCode",{parentName:"a"},"onNewDownloadItem")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QSharedPointer< "),(0,i.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefDownloadItem#class_q_cef_download_item"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefDownloadItem")),(0,i.kt)("inlineCode",{parentName:"h3"}," > & item, const QString & suggestedName)")),(0,i.kt)("p",null,"\u9700\u8981\u5bf9\u65b0\u4e0b\u8f7d\u9879\u7684\u8c03\u7528\u3002\u4fdd\u7559\u5bf9\u4e0b\u8f7d\u9879\u7684\u5f15\u7528\u5e76\u8c03\u7528 ",(0,i.kt)("a",{parentName:"p",href:"/QCefView/zh/docs/reference/QCefDownloadItem#class_q_cef_download_item_1a315592aa53a2bf7bc8aea717195f5b43"},"QCefDownloadItem::start")," \u65b9\u6cd5\u4ee5\u5141\u8bb8\u5e76\u542f\u52a8\u4e0b\u8f7d\uff0c\u5ffd\u7565\u4e0b\u8f7d\u9879\u4ee5\u7981\u6b62\u4e0b\u8f7d"),(0,i.kt)("h4",{id:"\u53c2\u6570-16"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"item")," \u65b0\u7684\u4e0b\u8f7d\u9879\u76ee")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"suggestedName")," \u65b0\u7684\u5efa\u8bae\u7684\u540d\u79f0"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a9833a1db8ef5864489f9462ef397cbb8"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected virtual void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a9833a1db8ef5864489f9462ef397cbb8"},(0,i.kt)("inlineCode",{parentName:"a"},"onUpdateDownloadItem")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QSharedPointer< "),(0,i.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefDownloadItem#class_q_cef_download_item"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefDownloadItem")),(0,i.kt)("inlineCode",{parentName:"h3"}," > & item)")),(0,i.kt)("p",null,"\u5728\u66f4\u65b0\u4e0b\u8f7d\u9879\u65f6\u8c03\u7528\u3002 \u82e5\u8981\u83b7\u53d6 ",(0,i.kt)("a",{parentName:"p",href:"/QCefView/zh/docs/reference/QCefDownloadItem#class_q_cef_download_item_1a315592aa53a2bf7bc8aea717195f5b43"},"QCefDownloadItem::start")," \u7684\u65b9\u6cd5\uff0c\u5fc5\u987b\u5728 newDownloadItem \u65b9\u6cd5\u4e2d\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-17"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"item")," \u4e0b\u8f7d\u9879\u76ee")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1aa205502bb5238e6e2ce727046ed8a9b8"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1aa205502bb5238e6e2ce727046ed8a9b8"},(0,i.kt)("inlineCode",{parentName:"a"},"paintEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QPaintEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::paintEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a02d713f4a0545e85832b70ddced7e831"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a02d713f4a0545e85832b70ddced7e831"},(0,i.kt)("inlineCode",{parentName:"a"},"inputMethodEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QInputMethodEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::inputMethodEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a08dcba31e0d2860270ab3cd8055a5c4e"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a08dcba31e0d2860270ab3cd8055a5c4e"},(0,i.kt)("inlineCode",{parentName:"a"},"showEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QShowEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::showEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1af2432e14ac8d9156594c3941ff6b4d14"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1af2432e14ac8d9156594c3941ff6b4d14"},(0,i.kt)("inlineCode",{parentName:"a"},"hideEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QHideEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::hideEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a05bf10e1e318cf9cc4ad742ad61c9706"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a05bf10e1e318cf9cc4ad742ad61c9706"},(0,i.kt)("inlineCode",{parentName:"a"},"focusInEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QFocusEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::focusInEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a414b4c9efe5edd10c324c1e35e12d07c"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a414b4c9efe5edd10c324c1e35e12d07c"},(0,i.kt)("inlineCode",{parentName:"a"},"focusOutEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QFocusEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::focusOutEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a237797e9f77342d72c35a8017865988e"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a237797e9f77342d72c35a8017865988e"},(0,i.kt)("inlineCode",{parentName:"a"},"resizeEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QResizeEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::resizeEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a6aa89a0ce04dac5aa2c01545253ffc56"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a6aa89a0ce04dac5aa2c01545253ffc56"},(0,i.kt)("inlineCode",{parentName:"a"},"keyPressEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QKeyEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::keyPressEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ab2d8e99188937bba13893ce6c54f9a3f"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ab2d8e99188937bba13893ce6c54f9a3f"},(0,i.kt)("inlineCode",{parentName:"a"},"keyReleaseEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QKeyEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::keyReleaseEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a3bd541e981d7dbad0deceb64df0d3a5b"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a3bd541e981d7dbad0deceb64df0d3a5b"},(0,i.kt)("inlineCode",{parentName:"a"},"mouseMoveEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QMouseEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::mouseMoveEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1aac476c39493a4e75e681b9e09f13e060"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1aac476c39493a4e75e681b9e09f13e060"},(0,i.kt)("inlineCode",{parentName:"a"},"mousePressEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QMouseEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::mousePressEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a69306a82128ba3e525103eb132aae62c"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a69306a82128ba3e525103eb132aae62c"},(0,i.kt)("inlineCode",{parentName:"a"},"mouseReleaseEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QMouseEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::mouseReleaseEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a3395f62959288420a834c736933e7228"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a3395f62959288420a834c736933e7228"},(0,i.kt)("inlineCode",{parentName:"a"},"wheelEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QWheelEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::wheelEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ac8a83d1f2fb0e771fb48007838b40d1f"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ac8a83d1f2fb0e771fb48007838b40d1f"},(0,i.kt)("inlineCode",{parentName:"a"},"contextMenuEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QContextMenuEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::contextMenuEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1afb28155fd58760bd84cf45f634e054b5"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1afb28155fd58760bd84cf45f634e054b5"},(0,i.kt)("inlineCode",{parentName:"a"},"loadingStateChanged")),(0,i.kt)("inlineCode",{parentName:"h3"},"(int browserId, bool isLoading, bool canGoBack, bool canGoForward)")),(0,i.kt)("p",null,"\u52a0\u8f7d\u72b6\u6001\u66f4\u6539\u65f6\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-18"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"browserId")," \u8868\u793a\u6d4f\u89c8\u5668 ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"isLoading")," \u8868\u793a\u6d4f\u89c8\u5668\u6b63\u5728\u52a0\u8f7d")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"canGoBack")," \u8868\u793a\u6d4f\u89c8\u5668\u53ef\u4ee5\u8fd4\u56de")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"canGoForward")," \u8868\u793a\u6d4f\u89c8\u5668\u53ef\u4ee5\u524d\u8fdb"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a0165da07749c09130e0007a4ceff59ca"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a0165da07749c09130e0007a4ceff59ca"},(0,i.kt)("inlineCode",{parentName:"a"},"loadStart")),(0,i.kt)("inlineCode",{parentName:"h3"},"(int browserId, qint64 frameId, bool isMainFrame, int transitionType)")),(0,i.kt)("p",null,"\u5728\u52a0\u8f7d\u5f00\u59cb\u65f6\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-19"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"browserId")," \u8868\u793a\u6d4f\u89c8\u5668 ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," \u8868\u793aframe ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"isMainFrame")," \u8868\u793a\u8fd9\u662f\u5426\u662f\u4e3bframe")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"transition_type")," \u8fc7\u6e21\u7c7b\u578b"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a5d64cbb95348336b85cb01f38de91e0a"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a5d64cbb95348336b85cb01f38de91e0a"},(0,i.kt)("inlineCode",{parentName:"a"},"loadEnd")),(0,i.kt)("inlineCode",{parentName:"h3"},"(int browserId, qint64 frameId, bool isMainFrame, int httpStatusCode)")),(0,i.kt)("p",null,"\u5728\u52a0\u8f7d\u7ed3\u675f\u65f6\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-20"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"browserId")," \u8868\u793a\u6d4f\u89c8\u5668 ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," \u8868\u793aframe ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"isMainFrame")," \u8868\u793a\u8fd9\u662f\u5426\u662f\u4e3bframe")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"httpStatusCode")," HTTP \u72b6\u6001\u4ee3\u7801"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a81ad0ea96d09d7ba705c4166502507e4"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a81ad0ea96d09d7ba705c4166502507e4"},(0,i.kt)("inlineCode",{parentName:"a"},"loadError")),(0,i.kt)("inlineCode",{parentName:"h3"},"(int browserId, qint64 frameId, bool isMainFrame, int errorCode, const QString & errorMsg, const QString & failedUrl)")),(0,i.kt)("p",null,"\u7531\u4e8e\u9519\u8bef\u5bfc\u81f4\u52a0\u8f7d\u5931\u8d25\u65f6\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-21"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"browserId")," \u8868\u793a\u6d4f\u89c8\u5668 ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," \u8868\u793aframe ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"isMainFrame")," \u8868\u793a\u8fd9\u662f\u5426\u662f\u4e3bframe")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"errorCode")," \u9519\u8bef\u4ee3\u7801")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"errorMsg")," \u9519\u8bef\u6d88\u606f")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"failedUrl")," \u5bfc\u81f4\u5931\u8d25\u7684\u7f51\u5740"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ae11274817f627abf9d407e12dcd5c050"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ae11274817f627abf9d407e12dcd5c050"},(0,i.kt)("inlineCode",{parentName:"a"},"draggableRegionChanged")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QRegion & draggableRegion, const QRegion & nonDraggableRegion)")),(0,i.kt)("p",null,"\u5728\u53ef\u62d6\u52a8\u533a\u57df\u66f4\u6539\u65f6\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-22"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"draggableRegion")," \u65b0\u7684\u53ef\u62d6\u52a8\u533a\u57df")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"nonDraggableRegion")," \u65b0\u7684\u4e0d\u53ef\u62d6\u52a8\u533a\u57df"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a89ce3bc031d5dcd1115482118a6c4181"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a89ce3bc031d5dcd1115482118a6c4181"},(0,i.kt)("inlineCode",{parentName:"a"},"addressChanged")),(0,i.kt)("inlineCode",{parentName:"h3"},"(qint64 frameId, const QString & url)")),(0,i.kt)("p",null,"\u5728\u7f51\u5740\u66f4\u6539\u65f6\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-23"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," frame ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"url")," \u7f51\u5740"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a48c82c208cab769a1baa7177bc58b030"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a48c82c208cab769a1baa7177bc58b030"},(0,i.kt)("inlineCode",{parentName:"a"},"titleChanged")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString & title)")),(0,i.kt)("p",null,"\u7f51\u7ad9\u6807\u9898\u66f4\u6539\u65f6\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-24"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"title")," \u7f51\u7ad9\u6807\u9898")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a7b9e104469c1a4a203c2e1d7e9cfd2a7"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a7b9e104469c1a4a203c2e1d7e9cfd2a7"},(0,i.kt)("inlineCode",{parentName:"a"},"faviconURLChanged")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QStringList & urls)")),(0,i.kt)("p",null,"\u7f51\u7ad9\u56fe\u6807\u5730\u5740\u66f4\u6539\u65f6\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-25"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"urls")," \u56fe\u6807\u5730\u5740")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1aa5d4a7098414f929a4ca7dd6b72d0893"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1aa5d4a7098414f929a4ca7dd6b72d0893"},(0,i.kt)("inlineCode",{parentName:"a"},"faviconChanged")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QIcon & icon)")),(0,i.kt)("p",null,"\u7f51\u7ad9\u56fe\u6807\u66f4\u6539\u65f6\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-26"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"icon")," \u56fe\u6807")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1afa0fbb5b4c2c6c3592085e9b94dffc4a"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1afa0fbb5b4c2c6c3592085e9b94dffc4a"},(0,i.kt)("inlineCode",{parentName:"a"},"fullscreenModeChanged")),(0,i.kt)("inlineCode",{parentName:"h3"},"(bool fullscreen)")),(0,i.kt)("p",null,"\u5728\u5168\u5c4f\u6a21\u5f0f\u66f4\u6539\u65f6\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-27"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"fullscreen")," \u5f53\u524d\u5168\u5c4f\u6a21\u5f0f")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a86d10c28b8821a36723e3504fa0cc7e7"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a86d10c28b8821a36723e3504fa0cc7e7"},(0,i.kt)("inlineCode",{parentName:"a"},"statusMessage")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString & message)")),(0,i.kt)("p",null,"\u72b6\u6001\u6d88\u606f\u66f4\u6539\u65f6\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-28"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"message")," \u72b6\u6001\u4fe1\u606f")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a2dae6946082712815273c2967d37762a"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a2dae6946082712815273c2967d37762a"},(0,i.kt)("inlineCode",{parentName:"a"},"consoleMessage")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString & message, int level)")),(0,i.kt)("p",null,"\u4ece Web \u5185\u5bb9\u8c03\u7528\u63a7\u5236\u53f0\u6d88\u606f"),(0,i.kt)("h4",{id:"\u53c2\u6570-29"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"message")," \u6d88\u606f")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"level")," \u7ea7\u522b"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ac7377eeed6811bafca1e6887b64d62a5"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ac7377eeed6811bafca1e6887b64d62a5"},(0,i.kt)("inlineCode",{parentName:"a"},"loadingProgressChanged")),(0,i.kt)("inlineCode",{parentName:"h3"},"(double progress)")),(0,i.kt)("p",null,"\u52a0\u8f7d\u8fdb\u5ea6\u66f4\u6539\u65f6\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-30"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"progress")," \u5f53\u524d\u8fdb\u5ea6")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a9085b5e19ee6eb1306ec29e40f09c6e3"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a9085b5e19ee6eb1306ec29e40f09c6e3"},(0,i.kt)("inlineCode",{parentName:"a"},"cefQueryRequest")),(0,i.kt)("inlineCode",{parentName:"h3"},"(int browserId, qint64 frameId, const "),(0,i.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefQuery#class_q_cef_query"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefQuery")),(0,i.kt)("inlineCode",{parentName:"h3"}," & query)")),(0,i.kt)("p",null,"\u5728\u65b0\u7684 ",(0,i.kt)("a",{parentName:"p",href:"/QCefView/zh/docs/reference/QCefQuery#class_q_cef_query"},"QCefQuery")," \u8bf7\u6c42\u4e0a\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-31"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"browserId")," \u6d4f\u89c8\u5668 ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," frame ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"query")," \u67e5\u8be2\u8bf7\u6c42"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a221d07818d4f6766f72c68319fecc24e"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a221d07818d4f6766f72c68319fecc24e"},(0,i.kt)("inlineCode",{parentName:"a"},"invokeMethod")),(0,i.kt)("inlineCode",{parentName:"h3"},"(int browserId, qint64 frameId, const QString & method, const QVariantList & arguments)")),(0,i.kt)("p",null,"\u5728\u4ece Web \u5185\u5bb9\u8c03\u7528\u65b9\u6cd5\u8bf7\u6c42\u65f6\u8c03\u7528\uff08Javascript\uff09"),(0,i.kt)("h4",{id:"\u53c2\u6570-32"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"browserId")," \u6d4f\u89c8\u5668 ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," frame ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"method")," \u65b9\u6cd5\u540d\u79f0")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"arguments")," \u53c2\u6570\u5217\u8868"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a3e5b637b042a2d17946a884f9bfc9bf0"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a3e5b637b042a2d17946a884f9bfc9bf0"},(0,i.kt)("inlineCode",{parentName:"a"},"reportJavascriptResult")),(0,i.kt)("inlineCode",{parentName:"h3"},"(int browserId, qint64 frameId, qint64 context, const QVariant & result)")),(0,i.kt)("p",null,"\u5bf9\u4f7f\u7528 ",(0,i.kt)("a",{parentName:"p",href:"#class_q_cef_view_1ad4f331cdfc2ca2ed0ab019d2c8857065"},"executeJavascriptWithResult")," \u6267\u884c\u7684 javascript \u7684\u7ed3\u679c\u8fdb\u884c\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-33"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"browserId")," \u6d4f\u89c8\u5668 ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," frame ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"context")," \u4e0a\u4e0b\u6587")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"result")," \u7ed3\u679c"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a543b0eca797c5161d6325665d5ddd576"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a543b0eca797c5161d6325665d5ddd576"},(0,i.kt)("inlineCode",{parentName:"a"},"nativeBrowserCreated")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QWindow * window)")),(0,i.kt)("p",null,"\u5728\u521b\u5efa\u539f\u751f\u6d4f\u89c8\u5668\u7a97\u53e3\u540e\u8c03\u7528\u3002\u4e0d\u9002\u7528\u4e8e OSR \u6a21\u5f0f\u3002"),(0,i.kt)("h4",{id:"\u53c2\u6570-34"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"win")," CEF \u7a97\u53e3")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ab008a40ecfdd9a616e31b401514ac1e3"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ab008a40ecfdd9a616e31b401514ac1e3"},(0,i.kt)("inlineCode",{parentName:"a"},"popupCreated")),(0,i.kt)("inlineCode",{parentName:"h3"},"("),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefView")),(0,i.kt)("inlineCode",{parentName:"h3"}," * popup)")),(0,i.kt)("p",null,"\u5728\u521b\u5efa\u5f39\u51fa\u5f0f\u6d4f\u89c8\u5668\u540e\u7acb\u5373\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-35"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"wnd")," \u65b0\u521b\u5efa\u7684\u5f39\u51fa\u5f0f ",(0,i.kt)("a",{parentName:"li",href:"#class_q_cef_view"},"QCefView")," \u5b9e\u4f8b")),(0,i.kt)("p",null,"\u5f39\u51fa\u5f0f\u6d4f\u89c8\u5668\u7684\u751f\u547d\u5468\u671f\u7531\u5f39\u51fa\u5f0f\u6d4f\u89c8\u5668\u7684\u6240\u6709\u8005\u7ba1\u7406\uff0c\u56e0\u6b64\u4e0d\u8981\u5c1d\u8bd5\u4fdd\u5b58\u5f39\u51fa\u5f0f\u6d4f\u89c8\u5668\u5b9e\u4f8b\u3002\u5982\u679c\u60a8\u9700\u8981\u5b9e\u73b0\u6d4f\u89c8\u5668\u9009\u9879\u5361\uff0c\u5219\u5e94\u91cd\u5199 ",(0,i.kt)("a",{parentName:"p",href:"#class_q_cef_view_1a2889f3055a30625f39cecb697c15aa04"},"onBeforePopup")," \u65b9\u6cd5\u5e76\u521b\u5efa\u81ea\u5df1\u7684 ",(0,i.kt)("a",{parentName:"p",href:"#class_q_cef_view"},"QCefView")," \u6d4f\u89c8\u5668\u5b9e\u4f8b\uff0c\u7136\u540e\u60a8\u53ef\u4ee5\u6839\u636e\u9700\u8981\u64cd\u4f5c\u521b\u5efa\u7684\u6d4f\u89c8\u5668\u5b9e\u4f8b\u3002"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a9b1b42857e38a9f5c6c810fd51593788"},(0,i.kt)("inlineCode",{parentName:"h3"},"{slot} public inline void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a9b1b42857e38a9f5c6c810fd51593788"},(0,i.kt)("inlineCode",{parentName:"a"},"setFocus")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a9963d810f8aa71b45b1b10f0abbe8787"},(0,i.kt)("inlineCode",{parentName:"h3"},"enum "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a9963d810f8aa71b45b1b10f0abbe8787"},(0,i.kt)("inlineCode",{parentName:"a"},"CefWindowOpenDisposition"))),(0,i.kt)("p",null,"\u8868\u793a CEF \u5f39\u51fa\u7a97\u53e3\u7684\u6253\u5f00\u914d\u7f6e\u679a\u4e3e"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Values"),(0,i.kt)("th",{parentName:"tr",align:null},"Descriptions"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"CefWindowOpenDispositionUnknown"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"CefWindowOpenDispositionCurrentTab"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"CefWindowOpenDispositionSingletonTab"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"CefWindowOpenDispositionNewForeGroundTab"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"CefWindowOpenDispositionNewBackgroundTab"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"CefWindowOpenDispositionNewPopup"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"CefWindowOpenDispositionNewWindow"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"CefWindowOpenDispositionSaveToDisk"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"CefWindowOpenDispositionOffTheRecord"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"CefWindowOpenDispositionIgnoreAction"),(0,i.kt)("td",{parentName:"tr",align:null})))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a6882524bec20e1620311b3853750638f"},(0,i.kt)("inlineCode",{parentName:"h3"},"private QScopedPointer< QCefViewPrivate > "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a6882524bec20e1620311b3853750638f"},(0,i.kt)("inlineCode",{parentName:"a"},"d_ptr"))))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/zh/assets/js/4c071278.e7569fae.js b/zh/assets/js/4c071278.e7569fae.js deleted file mode 100644 index c1c03306..00000000 --- a/zh/assets/js/4c071278.e7569fae.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkqcefviewdoc=self.webpackChunkqcefviewdoc||[]).push([[340],{3905:(e,a,t)=>{t.d(a,{Zo:()=>p,kt:()=>m});var n=t(7294);function i(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function l(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var a=1;a=0||(i[t]=e[t]);return i}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var c=n.createContext({}),o=function(e){var a=n.useContext(c),t=a;return e&&(t="function"==typeof e?e(a):d(d({},a),e)),t},p=function(e){var a=o(e.components);return n.createElement(c.Provider,{value:a},e.children)},k="mdxType",f={inlineCode:"code",wrapper:function(e){var a=e.children;return n.createElement(n.Fragment,{},a)}},s=n.forwardRef((function(e,a){var t=e.components,i=e.mdxType,l=e.originalType,c=e.parentName,p=r(e,["components","mdxType","originalType","parentName"]),k=o(t),s=i,m=k["".concat(c,".").concat(s)]||k[s]||f[s]||l;return t?n.createElement(m,d(d({ref:a},p),{},{components:t})):n.createElement(m,d({ref:a},p))}));function m(e,a){var t=arguments,i=a&&a.mdxType;if("string"==typeof e||i){var l=t.length,d=new Array(l);d[0]=s;var r={};for(var c in a)hasOwnProperty.call(a,c)&&(r[c]=a[c]);r.originalType=e,r[k]="string"==typeof e?e:i,d[1]=r;for(var o=2;o{t.r(a),t.d(a,{assets:()=>c,contentTitle:()=>d,default:()=>f,frontMatter:()=>l,metadata:()=>r,toc:()=>o});var n=t(7462),i=(t(7294),t(3905));const l={title:"QCefView"},d="class QCefView",r={unversionedId:"reference/QCefView",id:"reference/QCefView",title:"QCefView",description:"classqcef_view}",source:"@site/i18n/zh/docusaurus-plugin-content-docs/current/reference/QCefView.md",sourceDirName:"reference",slug:"/reference/QCefView",permalink:"/QCefView/zh/docs/reference/QCefView",draft:!1,editUrl:"https://github.com/CefView/QCefViewDoc/tree/master/i18n/zh/docusaurus-plugin-content-docs/current/reference/QCefView.md",tags:[],version:"current",frontMatter:{title:"QCefView"},sidebar:"default",previous:{title:"QCefSetting",permalink:"/QCefView/zh/docs/reference/QCefSetting"},next:{title:"Web APIs",permalink:"/QCefView/zh/docs/reference/WebAPIs"}},c={},o=[{value:"\u603b\u7ed3",id:"\u603b\u7ed3",level:2},{value:"Members",id:"members",level:2},{value:"public QCefView(const QString url, const QCefSetting * setting, QWidget * parent, Qt::WindowFlags f)",id:"class_q_cef_view_1ad1e23ad619da083eefa20a14ba38a228",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570",level:4},{value:"public QCefView(QWidget * parent, Qt::WindowFlags f)",id:"class_q_cef_view_1a11c38eefb7b152dbf73620cb23922df0",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-1",level:4},{value:"public ~QCefView()",id:"class_q_cef_view_1a70903dca8ccd3e2776d68742531177fd",level:3},{value:"public void addLocalFolderResource(const QString & path, const QString & url, int priority)",id:"class_q_cef_view_1a8c6286b279094a691832fc89b93c75f1",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-2",level:4},{value:"public void addArchiveResource(const QString & path, const QString & url, const QString & password, int priority)",id:"class_q_cef_view_1a503148f8ff5ca5b28d3f0e123bf5bf76",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-3",level:4},{value:"public int browserId()",id:"class_q_cef_view_1ae4aa1652bf9852ed744dd38487bbb748",level:3},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c",level:4},{value:"public bool isPopup()",id:"class_q_cef_view_1a532ffb1fb0090dd866454234d518619c",level:3},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-1",level:4},{value:"public void navigateToString(const QString & content)",id:"class_q_cef_view_1ac3b8ec3b088422a67f93fc580047a1a0",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-4",level:4},{value:"public void navigateToUrl(const QString & url)",id:"class_q_cef_view_1a4bf036d5a7d128d4c1487afaa0393d5b",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-5",level:4},{value:"public bool browserCanGoBack()",id:"class_q_cef_view_1a01100f7ab97f9f643e4f23af5cea9900",level:3},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-2",level:4},{value:"public bool browserCanGoForward()",id:"class_q_cef_view_1ae1d6a6d94e02a54654463e5b0c491624",level:3},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-3",level:4},{value:"public void browserGoBack()",id:"class_q_cef_view_1aa82e1ceaa7f543f8d99d7d9cbf714382",level:3},{value:"public void browserGoForward()",id:"class_q_cef_view_1a9ce96fbf25701594b8d65381661141db",level:3},{value:"public bool browserIsLoading()",id:"class_q_cef_view_1a12ca0bc0f4fc55dfc838769990d6a6d7",level:3},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-4",level:4},{value:"public void browserReload()",id:"class_q_cef_view_1a45bc8cd7340ce410cf873d7296ffacf6",level:3},{value:"public void browserStopLoad()",id:"class_q_cef_view_1afadd210f3c5cd95598b18aa158a9c16f",level:3},{value:"public bool triggerEvent(const QCefEvent & event)",id:"class_q_cef_view_1ac47c23ffcd94bdffe2b6a81eaae077a2",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-6",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-5",level:4},{value:"public bool triggerEvent(const QCefEvent & event, qint64 frameId)",id:"class_q_cef_view_1ab6afab6f26fb1a1b4f3b25d2fe9c2f13",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-7",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-6",level:4},{value:"public bool broadcastEvent(const QCefEvent & event)",id:"class_q_cef_view_1ad5455e3a8cb0ffa1f9d7cb98307a6bb4",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-8",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-7",level:4},{value:"public bool responseQCefQuery(const QCefQuery & query)",id:"class_q_cef_view_1afc838dab54d2b083b05f0d98349b50cc",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-9",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-8",level:4},{value:"public bool executeJavascript(qint64 frameId, const QString & code, const QString & url)",id:"class_q_cef_view_1a79a5f1f466b1e8b96c89b24058194fe8",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-10",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-9",level:4},{value:"public bool executeJavascriptWithResult(qint64 frameId, const QString & code, const QString & url, qint64 context)",id:"class_q_cef_view_1ad4f331cdfc2ca2ed0ab019d2c8857065",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-11",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-10",level:4},{value:"public bool setPreference(const QString & name, const QVariant & value, const QString & error)",id:"class_q_cef_view_1a2b4b3da8874855bbe2d558081233d948",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-12",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-11",level:4},{value:"public void setDisablePopupContextMenu(bool disable)",id:"class_q_cef_view_1acca71443b26dce09e81e3f937cedaa6b",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-13",level:4},{value:"public bool isPopupContextMenuDisabled()",id:"class_q_cef_view_1abb79735affb74166c0bed7f361ce1388",level:3},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-12",level:4},{value:"public bool hasDevTools()",id:"class_q_cef_view_1a85fd904cbd3b91a72ce090cffb0119c8",level:3},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-13",level:4},{value:"public void showDevTools()",id:"class_q_cef_view_1a61845e6e370a57be5f3662ba37cd7b29",level:3},{value:"public void closeDevTools()",id:"class_q_cef_view_1abdf0a68139fe9163ecd9b5a0cdeed6d7",level:3},{value:"public void setEnableDragAndDrop(bool enable)",id:"class_q_cef_view_1af73ef1d6f77a31b528c729cf7379abfb",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-14",level:4},{value:"public bool isDragAndDropEnabled() const",id:"class_q_cef_view_1a2a8a2ebaedb88ccd80536c66d878ff8a",level:3},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-14",level:4},{value:"public void setFocus(Qt::FocusReason reason)",id:"class_q_cef_view_1a61ad737cd2354021f8310f323f4f8ada",level:3},{value:"public QVariant inputMethodQuery(Qt::InputMethodQuery query) const",id:"class_q_cef_view_1af25a011c126a9bb5dc3df99756a75368",level:3},{value:"protected virtual bool onBeforePopup(qint64 frameId, const QString & targetUrl, const QString & targetFrameName, QCefView::CefWindowOpenDispositiontargetDisposition, QRect & rect,QCefSetting & settings)",id:"class_q_cef_view_1a2889f3055a30625f39cecb697c15aa04",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-15",level:4},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c-15",level:4},{value:"protected virtual void onNewDownloadItem(const QSharedPointer< QCefDownloadItem > & item, const QString & suggestedName)",id:"class_q_cef_view_1a666e93d6e9f9be7444f9b898f77c8292",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-16",level:4},{value:"protected virtual void onUpdateDownloadItem(const QSharedPointer< QCefDownloadItem > & item)",id:"class_q_cef_view_1a9833a1db8ef5864489f9462ef397cbb8",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-17",level:4},{value:"protected void paintEvent(QPaintEvent * event)",id:"class_q_cef_view_1aa205502bb5238e6e2ce727046ed8a9b8",level:3},{value:"protected void inputMethodEvent(QInputMethodEvent * event)",id:"class_q_cef_view_1a02d713f4a0545e85832b70ddced7e831",level:3},{value:"protected void showEvent(QShowEvent * event)",id:"class_q_cef_view_1a08dcba31e0d2860270ab3cd8055a5c4e",level:3},{value:"protected void hideEvent(QHideEvent * event)",id:"class_q_cef_view_1af2432e14ac8d9156594c3941ff6b4d14",level:3},{value:"protected void focusInEvent(QFocusEvent * event)",id:"class_q_cef_view_1a05bf10e1e318cf9cc4ad742ad61c9706",level:3},{value:"protected void focusOutEvent(QFocusEvent * event)",id:"class_q_cef_view_1a414b4c9efe5edd10c324c1e35e12d07c",level:3},{value:"protected void resizeEvent(QResizeEvent * event)",id:"class_q_cef_view_1a237797e9f77342d72c35a8017865988e",level:3},{value:"protected void keyPressEvent(QKeyEvent * event)",id:"class_q_cef_view_1a6aa89a0ce04dac5aa2c01545253ffc56",level:3},{value:"protected void keyReleaseEvent(QKeyEvent * event)",id:"class_q_cef_view_1ab2d8e99188937bba13893ce6c54f9a3f",level:3},{value:"protected void mouseMoveEvent(QMouseEvent * event)",id:"class_q_cef_view_1a3bd541e981d7dbad0deceb64df0d3a5b",level:3},{value:"protected void mousePressEvent(QMouseEvent * event)",id:"class_q_cef_view_1aac476c39493a4e75e681b9e09f13e060",level:3},{value:"protected void mouseReleaseEvent(QMouseEvent * event)",id:"class_q_cef_view_1a69306a82128ba3e525103eb132aae62c",level:3},{value:"protected void wheelEvent(QWheelEvent * event)",id:"class_q_cef_view_1a3395f62959288420a834c736933e7228",level:3},{value:"protected void contextMenuEvent(QContextMenuEvent * event)",id:"class_q_cef_view_1ac8a83d1f2fb0e771fb48007838b40d1f",level:3},{value:"{signal} public void loadingStateChanged(int browserId, bool isLoading, bool canGoBack, bool canGoForward)",id:"class_q_cef_view_1afb28155fd58760bd84cf45f634e054b5",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-18",level:4},{value:"{signal} public void loadStart(int browserId, qint64 frameId, bool isMainFrame, int transitionType)",id:"class_q_cef_view_1a0165da07749c09130e0007a4ceff59ca",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-19",level:4},{value:"{signal} public void loadEnd(int browserId, qint64 frameId, bool isMainFrame, int httpStatusCode)",id:"class_q_cef_view_1a5d64cbb95348336b85cb01f38de91e0a",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-20",level:4},{value:"{signal} public void loadError(int browserId, qint64 frameId, bool isMainFrame, int errorCode, const QString & errorMsg, const QString & failedUrl)",id:"class_q_cef_view_1a81ad0ea96d09d7ba705c4166502507e4",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-21",level:4},{value:"{signal} public void draggableRegionChanged(const QRegion & draggableRegion, const QRegion & nonDraggableRegion)",id:"class_q_cef_view_1ae11274817f627abf9d407e12dcd5c050",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-22",level:4},{value:"{signal} public void addressChanged(qint64 frameId, const QString & url)",id:"class_q_cef_view_1a89ce3bc031d5dcd1115482118a6c4181",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-23",level:4},{value:"{signal} public void titleChanged(const QString & title)",id:"class_q_cef_view_1a48c82c208cab769a1baa7177bc58b030",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-24",level:4},{value:"{signal} public void faviconURLChanged(const QStringList & urls)",id:"class_q_cef_view_1a7b9e104469c1a4a203c2e1d7e9cfd2a7",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-25",level:4},{value:"{signal} public void faviconChanged(const QIcon & icon)",id:"class_q_cef_view_1aa5d4a7098414f929a4ca7dd6b72d0893",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-26",level:4},{value:"{signal} public void fullscreenModeChanged(bool fullscreen)",id:"class_q_cef_view_1afa0fbb5b4c2c6c3592085e9b94dffc4a",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-27",level:4},{value:"{signal} public void statusMessage(const QString & message)",id:"class_q_cef_view_1a86d10c28b8821a36723e3504fa0cc7e7",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-28",level:4},{value:"{signal} public void consoleMessage(const QString & message, int level)",id:"class_q_cef_view_1a2dae6946082712815273c2967d37762a",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-29",level:4},{value:"{signal} public void loadingProgressChanged(double progress)",id:"class_q_cef_view_1ac7377eeed6811bafca1e6887b64d62a5",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-30",level:4},{value:"{signal} public void cefQueryRequest(int browserId, qint64 frameId, const QCefQuery & query)",id:"class_q_cef_view_1a9085b5e19ee6eb1306ec29e40f09c6e3",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-31",level:4},{value:"{signal} public void invokeMethod(int browserId, qint64 frameId, const QString & method, const QVariantList & arguments)",id:"class_q_cef_view_1a221d07818d4f6766f72c68319fecc24e",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-32",level:4},{value:"{signal} public void reportJavascriptResult(int browserId, qint64 frameId, qint64 context, const QVariant & result)",id:"class_q_cef_view_1a3e5b637b042a2d17946a884f9bfc9bf0",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-33",level:4},{value:"{signal} public void nativeBrowserCreated(QWindow * window)",id:"class_q_cef_view_1a543b0eca797c5161d6325665d5ddd576",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-34",level:4},{value:"{signal} public void popupCreated(QCefView * popup)",id:"class_q_cef_view_1ab008a40ecfdd9a616e31b401514ac1e3",level:3},{value:"\u53c2\u6570",id:"\u53c2\u6570-35",level:4},{value:"{slot} public inline void setFocus()",id:"class_q_cef_view_1a9b1b42857e38a9f5c6c810fd51593788",level:3},{value:"enum CefWindowOpenDisposition",id:"class_q_cef_view_1a9963d810f8aa71b45b1b10f0abbe8787",level:3},{value:"private QScopedPointer< QCefViewPrivate > d_ptr",id:"class_q_cef_view_1a6882524bec20e1620311b3853750638f",level:3}],p={toc:o},k="wrapper";function f(e){let{components:a,...t}=e;return(0,i.kt)(k,(0,n.Z)({},p,t,{components:a,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"class_q_cef_view"},"class ",(0,i.kt)("inlineCode",{parentName:"h1"},"QCefView")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"class QCefView\n : public QWidget\n")),(0,i.kt)("p",null,"\u8868\u793a CEF \u6d4f\u89c8\u5668\u89c6\u56fe"),(0,i.kt)("h2",{id:"\u603b\u7ed3"},"\u603b\u7ed3"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"\u6210\u5458"),(0,i.kt)("th",{parentName:"tr",align:null},"\u63cf\u8ff0"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ad1e23ad619da083eefa20a14ba38a228"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefView")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString url, const "),(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefSetting#class_q_cef_setting"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefSetting")),(0,i.kt)("inlineCode",{parentName:"td"}," * setting, QWidget * parent, Qt::WindowFlags f)")),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view"},"QCefView")," \u6709\u53c2\u6784\u9020\u51fd\u6570")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a11c38eefb7b152dbf73620cb23922df0"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefView")),(0,i.kt)("inlineCode",{parentName:"td"},"(QWidget * parent, Qt::WindowFlags f)")),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view"},"QCefView")," \u6709\u53c2\u6784\u9020\u51fd\u6570")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a70903dca8ccd3e2776d68742531177fd"},(0,i.kt)("inlineCode",{parentName:"a"},"~QCefView")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view"},"QCefView")," \u6790\u6784\u51fd\u6570")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a8c6286b279094a691832fc89b93c75f1"},(0,i.kt)("inlineCode",{parentName:"a"},"addLocalFolderResource")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString & path, const QString & url, int priority)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u6dfb\u52a0\u5177\u6709\u672c\u5730 Web \u8d44\u6e90\u76ee\u5f55\u7684 url \u6620\u5c04\u9879")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a503148f8ff5ca5b28d3f0e123bf5bf76"},(0,i.kt)("inlineCode",{parentName:"a"},"addArchiveResource")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString & path, const QString & url, const QString & password, int priority)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u4f7f\u7528\u5305\u542b Web \u8d44\u6e90\u7684\u672c\u5730\u5b58\u6863 \uff08.zip\uff09 \u6587\u4ef6\u6dfb\u52a0 url \u6620\u5c04\u9879")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public int "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ae4aa1652bf9852ed744dd38487bbb748"},(0,i.kt)("inlineCode",{parentName:"a"},"browserId")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u83b7\u53d6\u6d4f\u89c8\u5668 ID")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a532ffb1fb0090dd866454234d518619c"},(0,i.kt)("inlineCode",{parentName:"a"},"isPopup")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u83b7\u53d6\u6d4f\u89c8\u5668\u662f\u5426\u521b\u5efa\u4e3a\u5f39\u51fa\u5f0f\u6d4f\u89c8\u5668")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ac3b8ec3b088422a67f93fc580047a1a0"},(0,i.kt)("inlineCode",{parentName:"a"},"navigateToString")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString & content)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5bfc\u822a\u5230\u5185\u5bb9")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a4bf036d5a7d128d4c1487afaa0393d5b"},(0,i.kt)("inlineCode",{parentName:"a"},"navigateToUrl")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString & url)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5bfc\u822a\u5230\u7f51\u5740")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a01100f7ab97f9f643e4f23af5cea9900"},(0,i.kt)("inlineCode",{parentName:"a"},"browserCanGoBack")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u68c0\u67e5\u6d4f\u89c8\u5668\u662f\u5426\u53ef\u4ee5\u8fd4\u56de")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ae1d6a6d94e02a54654463e5b0c491624"},(0,i.kt)("inlineCode",{parentName:"a"},"browserCanGoForward")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u68c0\u67e5\u6d4f\u89c8\u5668\u662f\u5426\u53ef\u4ee5\u524d\u8fdb")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1aa82e1ceaa7f543f8d99d7d9cbf714382"},(0,i.kt)("inlineCode",{parentName:"a"},"browserGoBack")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8981\u6c42\u6d4f\u89c8\u5668\u8fd4\u56de")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a9ce96fbf25701594b8d65381661141db"},(0,i.kt)("inlineCode",{parentName:"a"},"browserGoForward")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8981\u6c42\u6d4f\u89c8\u5668\u524d\u8fdb")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a12ca0bc0f4fc55dfc838769990d6a6d7"},(0,i.kt)("inlineCode",{parentName:"a"},"browserIsLoading")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u68c0\u67e5\u6d4f\u89c8\u5668\u662f\u5426\u6b63\u5728\u52a0\u8f7d")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a45bc8cd7340ce410cf873d7296ffacf6"},(0,i.kt)("inlineCode",{parentName:"a"},"browserReload")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8981\u6c42\u6d4f\u89c8\u5668\u91cd\u65b0\u52a0\u8f7d")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1afadd210f3c5cd95598b18aa158a9c16f"},(0,i.kt)("inlineCode",{parentName:"a"},"browserStopLoad")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8981\u6c42\u6d4f\u89c8\u5668\u505c\u6b62\u52a0\u8f7d")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ac47c23ffcd94bdffe2b6a81eaae077a2"},(0,i.kt)("inlineCode",{parentName:"a"},"triggerEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(const "),(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefEvent#class_q_cef_event"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefEvent")),(0,i.kt)("inlineCode",{parentName:"td"}," & event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u89e6\u53d1\u4e3b\u6846\u67b6\u7684\u4e8b\u4ef6")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ab6afab6f26fb1a1b4f3b25d2fe9c2f13"},(0,i.kt)("inlineCode",{parentName:"a"},"triggerEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(const "),(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefEvent#class_q_cef_event"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefEvent")),(0,i.kt)("inlineCode",{parentName:"td"}," & event, qint64 frameId)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u89e6\u53d1\u6307\u5b9aframe\u7684\u4e8b\u4ef6")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ad5455e3a8cb0ffa1f9d7cb98307a6bb4"},(0,i.kt)("inlineCode",{parentName:"a"},"broadcastEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(const "),(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefEvent#class_q_cef_event"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefEvent")),(0,i.kt)("inlineCode",{parentName:"td"}," & event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u4e3a\u6240\u6709frame\u5e7f\u64ad\u4e8b\u4ef6")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1afc838dab54d2b083b05f0d98349b50cc"},(0,i.kt)("inlineCode",{parentName:"a"},"responseQCefQuery")),(0,i.kt)("inlineCode",{parentName:"td"},"(const "),(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefQuery#class_q_cef_query"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefQuery")),(0,i.kt)("inlineCode",{parentName:"td"}," & query)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u54cd\u5e94 ",(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefQuery#class_q_cef_query"},"QCefQuery")," \u8bf7\u6c42")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a79a5f1f466b1e8b96c89b24058194fe8"},(0,i.kt)("inlineCode",{parentName:"a"},"executeJavascript")),(0,i.kt)("inlineCode",{parentName:"td"},"(qint64 frameId, const QString & code, const QString & url)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u6307\u5b9a\u7684frame\u4e2d\u6267\u884cjavascript\u4ee3\u7801\uff0c\u6b64\u65b9\u6cd5\u4e0d\u62a5\u544ajavascript\u7684\u7ed3\u679c\u3002\u8981\u83b7\u53d6 javascript \u6267\u884c\u7684\u7ed3\u679c\uff0c\u8bf7\u4f7f\u7528",(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ad4f331cdfc2ca2ed0ab019d2c8857065"},"executeJavascriptWithResult"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ad4f331cdfc2ca2ed0ab019d2c8857065"},(0,i.kt)("inlineCode",{parentName:"a"},"executeJavascriptWithResult")),(0,i.kt)("inlineCode",{parentName:"td"},"(qint64 frameId, const QString & code, const QString & url, qint64 context)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u6307\u5b9a\u7684frame\u4e2d\u6267\u884cjavascript\u4ee3\u7801\uff0c\u7ed3\u679c\u5c06\u901a\u8fc7",(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a3e5b637b042a2d17946a884f9bfc9bf0"},"reportJavascriptResult")," \u4fe1\u53f7\u53d1\u9001")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a2b4b3da8874855bbe2d558081233d948"},(0,i.kt)("inlineCode",{parentName:"a"},"setPreference")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString & name, const QVariant & value, const QString & error)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bbe\u7f6e\u6b64\u6d4f\u89c8\u5668\u7684\u9996\u9009\u9879")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1acca71443b26dce09e81e3f937cedaa6b"},(0,i.kt)("inlineCode",{parentName:"a"},"setDisablePopupContextMenu")),(0,i.kt)("inlineCode",{parentName:"td"},"(bool disable)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bbe\u7f6e\u662f\u5426\u7981\u7528\u5f39\u51fa\u6d4f\u89c8\u5668\u7684\u4e0a\u4e0b\u6587\u83dc\u5355")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1abb79735affb74166c0bed7f361ce1388"},(0,i.kt)("inlineCode",{parentName:"a"},"isPopupContextMenuDisabled")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u83b7\u53d6\u662f\u5426\u7981\u7528\u5f39\u51fa\u6d4f\u89c8\u5668\u7684\u4e0a\u4e0b\u6587\u83dc\u5355")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a85fd904cbd3b91a72ce090cffb0119c8"},(0,i.kt)("inlineCode",{parentName:"a"},"hasDevTools")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u68c0\u6d4b\u6b64\u6d4f\u89c8\u5668\u662f\u5426\u6253\u5f00\u4e86devtools")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a61845e6e370a57be5f3662ba37cd7b29"},(0,i.kt)("inlineCode",{parentName:"a"},"showDevTools")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u6253\u5f00 devtools \u5bf9\u8bdd\u6846")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1abdf0a68139fe9163ecd9b5a0cdeed6d7"},(0,i.kt)("inlineCode",{parentName:"a"},"closeDevTools")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5173\u95ed devtools \u5bf9\u8bdd\u6846")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1af73ef1d6f77a31b528c729cf7379abfb"},(0,i.kt)("inlineCode",{parentName:"a"},"setEnableDragAndDrop")),(0,i.kt)("inlineCode",{parentName:"td"},"(bool enable)")),(0,i.kt)("td",{parentName:"tr",align:null},"Sets whether to enable drag and drop.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a2a8a2ebaedb88ccd80536c66d878ff8a"},(0,i.kt)("inlineCode",{parentName:"a"},"isDragAndDropEnabled")),(0,i.kt)("inlineCode",{parentName:"td"},"() const")),(0,i.kt)("td",{parentName:"tr",align:null},"Gets whether to enable drag and drop.")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a61ad737cd2354021f8310f323f4f8ada"},(0,i.kt)("inlineCode",{parentName:"a"},"setFocus")),(0,i.kt)("inlineCode",{parentName:"td"},"(Qt::FocusReason reason)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::setFocus"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"public QVariant "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1af25a011c126a9bb5dc3df99756a75368"},(0,i.kt)("inlineCode",{parentName:"a"},"inputMethodQuery")),(0,i.kt)("inlineCode",{parentName:"td"},"(Qt::InputMethodQuery query) const")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::inputMethodQuery"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected virtual bool "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a2889f3055a30625f39cecb697c15aa04"},(0,i.kt)("inlineCode",{parentName:"a"},"onBeforePopup")),(0,i.kt)("inlineCode",{parentName:"td"},"(qint64 frameId, const QString & targetUrl, const QString & targetFrameName, "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a9963d810f8aa71b45b1b10f0abbe8787"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefView::CefWindowOpenDisposition")),(0,i.kt)("inlineCode",{parentName:"td"},"targetDisposition, QRect & rect,"),(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefSetting#class_q_cef_setting"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefSetting")),(0,i.kt)("inlineCode",{parentName:"td"}," & settings)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u521b\u5efa\u5f39\u51fa\u5f0f\u6d4f\u89c8\u5668\u4e4b\u524d\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected virtual void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a666e93d6e9f9be7444f9b898f77c8292"},(0,i.kt)("inlineCode",{parentName:"a"},"onNewDownloadItem")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QSharedPointer< "),(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefDownloadItem#class_q_cef_download_item"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefDownloadItem")),(0,i.kt)("inlineCode",{parentName:"td"}," > & item, const QString & suggestedName)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u9700\u8981\u5bf9\u65b0\u4e0b\u8f7d\u9879\u7684\u8c03\u7528\u3002\u4fdd\u7559\u5bf9\u4e0b\u8f7d\u9879\u7684\u5f15\u7528\u5e76\u8c03\u7528 ",(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefDownloadItem#class_q_cef_download_item_1a315592aa53a2bf7bc8aea717195f5b43"},"QCefDownloadItem::start")," \u65b9\u6cd5\u4ee5\u5141\u8bb8\u5e76\u542f\u52a8\u4e0b\u8f7d\uff0c\u5ffd\u7565\u4e0b\u8f7d\u9879\u4ee5\u7981\u6b62\u4e0b\u8f7d")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected virtual void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a9833a1db8ef5864489f9462ef397cbb8"},(0,i.kt)("inlineCode",{parentName:"a"},"onUpdateDownloadItem")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QSharedPointer< "),(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefDownloadItem#class_q_cef_download_item"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefDownloadItem")),(0,i.kt)("inlineCode",{parentName:"td"}," > & item)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u66f4\u65b0\u4e0b\u8f7d\u9879\u65f6\u8c03\u7528\u3002 \u82e5\u8981\u83b7\u53d6",(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefDownloadItem#class_q_cef_download_item_1a315592aa53a2bf7bc8aea717195f5b43"},"QCefDownloadItem::start"),"\u7684\u65b9\u6cd5\uff0c\u5fc5\u987b\u5728 newDownloadItem \u65b9\u6cd5\u4e2d\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1aa205502bb5238e6e2ce727046ed8a9b8"},(0,i.kt)("inlineCode",{parentName:"a"},"paintEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QPaintEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::paintEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a02d713f4a0545e85832b70ddced7e831"},(0,i.kt)("inlineCode",{parentName:"a"},"inputMethodEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QInputMethodEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::inputMethodEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a08dcba31e0d2860270ab3cd8055a5c4e"},(0,i.kt)("inlineCode",{parentName:"a"},"showEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QShowEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::showEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1af2432e14ac8d9156594c3941ff6b4d14"},(0,i.kt)("inlineCode",{parentName:"a"},"hideEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QHideEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::hideEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a05bf10e1e318cf9cc4ad742ad61c9706"},(0,i.kt)("inlineCode",{parentName:"a"},"focusInEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QFocusEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::focusInEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a414b4c9efe5edd10c324c1e35e12d07c"},(0,i.kt)("inlineCode",{parentName:"a"},"focusOutEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QFocusEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::focusOutEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a237797e9f77342d72c35a8017865988e"},(0,i.kt)("inlineCode",{parentName:"a"},"resizeEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QResizeEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::resizeEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a6aa89a0ce04dac5aa2c01545253ffc56"},(0,i.kt)("inlineCode",{parentName:"a"},"keyPressEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QKeyEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::keyPressEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ab2d8e99188937bba13893ce6c54f9a3f"},(0,i.kt)("inlineCode",{parentName:"a"},"keyReleaseEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QKeyEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::keyReleaseEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a3bd541e981d7dbad0deceb64df0d3a5b"},(0,i.kt)("inlineCode",{parentName:"a"},"mouseMoveEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QMouseEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::mouseMoveEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1aac476c39493a4e75e681b9e09f13e060"},(0,i.kt)("inlineCode",{parentName:"a"},"mousePressEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QMouseEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::mousePressEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a69306a82128ba3e525103eb132aae62c"},(0,i.kt)("inlineCode",{parentName:"a"},"mouseReleaseEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QMouseEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::mouseReleaseEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a3395f62959288420a834c736933e7228"},(0,i.kt)("inlineCode",{parentName:"a"},"wheelEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QWheelEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::wheelEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"protected void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ac8a83d1f2fb0e771fb48007838b40d1f"},(0,i.kt)("inlineCode",{parentName:"a"},"contextMenuEvent")),(0,i.kt)("inlineCode",{parentName:"td"},"(QContextMenuEvent * event)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::contextMenuEvent"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1afb28155fd58760bd84cf45f634e054b5"},(0,i.kt)("inlineCode",{parentName:"a"},"loadingStateChanged")),(0,i.kt)("inlineCode",{parentName:"td"},"(int browserId, bool isLoading, bool canGoBack, bool canGoForward)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u52a0\u8f7d\u72b6\u6001\u66f4\u6539\u65f6\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a0165da07749c09130e0007a4ceff59ca"},(0,i.kt)("inlineCode",{parentName:"a"},"loadStart")),(0,i.kt)("inlineCode",{parentName:"td"},"(int browserId, qint64 frameId, bool isMainFrame, int transition_type)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u52a0\u8f7d\u5f00\u59cb\u65f6\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a5d64cbb95348336b85cb01f38de91e0a"},(0,i.kt)("inlineCode",{parentName:"a"},"loadEnd")),(0,i.kt)("inlineCode",{parentName:"td"},"(int browserId, qint64 frameId, bool isMainFrame, int httpStatusCode)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u52a0\u8f7d\u7ed3\u675f\u65f6\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a81ad0ea96d09d7ba705c4166502507e4"},(0,i.kt)("inlineCode",{parentName:"a"},"loadError")),(0,i.kt)("inlineCode",{parentName:"td"},"(int browserId, qint64 frameId, bool isMainFrame, int errorCode, const QString & errorMsg, const QString & failedUrl)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u7531\u4e8e\u9519\u8bef\u5bfc\u81f4\u52a0\u8f7d\u5931\u8d25\u65f6\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ae11274817f627abf9d407e12dcd5c050"},(0,i.kt)("inlineCode",{parentName:"a"},"draggableRegionChanged")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QRegion & draggableRegion, const QRegion & nonDraggableRegion)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u53ef\u62d6\u52a8\u533a\u57df\u66f4\u6539\u65f6\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a89ce3bc031d5dcd1115482118a6c4181"},(0,i.kt)("inlineCode",{parentName:"a"},"addressChanged")),(0,i.kt)("inlineCode",{parentName:"td"},"(qint64 frameId, const QString & url)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u7f51\u5740\u66f4\u6539\u65f6\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a48c82c208cab769a1baa7177bc58b030"},(0,i.kt)("inlineCode",{parentName:"a"},"titleChanged")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString & title)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u7f51\u7ad9\u6807\u9898\u66f4\u6539\u65f6\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a7b9e104469c1a4a203c2e1d7e9cfd2a7"},(0,i.kt)("inlineCode",{parentName:"a"},"faviconURLChanged")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QStringList & urls)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u7f51\u7ad9\u56fe\u6807\u5730\u5740\u66f4\u6539\u65f6\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1aa5d4a7098414f929a4ca7dd6b72d0893"},(0,i.kt)("inlineCode",{parentName:"a"},"faviconChanged")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QIcon & icon)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u7f51\u7ad9\u56fe\u6807\u66f4\u6539\u65f6\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1afa0fbb5b4c2c6c3592085e9b94dffc4a"},(0,i.kt)("inlineCode",{parentName:"a"},"fullscreenModeChanged")),(0,i.kt)("inlineCode",{parentName:"td"},"(bool fullscreen)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u5168\u5c4f\u6a21\u5f0f\u66f4\u6539\u65f6\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a86d10c28b8821a36723e3504fa0cc7e7"},(0,i.kt)("inlineCode",{parentName:"a"},"statusMessage")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString & message)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u72b6\u6001\u6d88\u606f\u66f4\u6539\u65f6\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a2dae6946082712815273c2967d37762a"},(0,i.kt)("inlineCode",{parentName:"a"},"consoleMessage")),(0,i.kt)("inlineCode",{parentName:"td"},"(const QString & message, int level)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u4ece Web \u5185\u5bb9\u8c03\u7528\u63a7\u5236\u53f0\u6d88\u606f")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ac7377eeed6811bafca1e6887b64d62a5"},(0,i.kt)("inlineCode",{parentName:"a"},"loadingProgressChanged")),(0,i.kt)("inlineCode",{parentName:"td"},"(double progress)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u52a0\u8f7d\u8fdb\u5ea6\u66f4\u6539\u65f6\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a9085b5e19ee6eb1306ec29e40f09c6e3"},(0,i.kt)("inlineCode",{parentName:"a"},"cefQueryRequest")),(0,i.kt)("inlineCode",{parentName:"td"},"(int browserId, qint64 frameId, const "),(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefQuery#class_q_cef_query"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefQuery")),(0,i.kt)("inlineCode",{parentName:"td"}," & query)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u65b0\u7684 ",(0,i.kt)("a",{parentName:"td",href:"/QCefView/zh/docs/reference/QCefQuery#class_q_cef_query"},"QCefQuery")," \u8bf7\u6c42\u4e0a\u88ab\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a221d07818d4f6766f72c68319fecc24e"},(0,i.kt)("inlineCode",{parentName:"a"},"invokeMethod")),(0,i.kt)("inlineCode",{parentName:"td"},"(int browserId, qint64 frameId, const QString & method, const QVariantList & arguments)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u4ece Web \u5185\u5bb9\u8c03\u7528\u65b9\u6cd5\u8bf7\u6c42\u65f6\u8c03\u7528\uff08Javascript\uff09")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a3e5b637b042a2d17946a884f9bfc9bf0"},(0,i.kt)("inlineCode",{parentName:"a"},"reportJavascriptResult")),(0,i.kt)("inlineCode",{parentName:"td"},"(int browserId, qint64 frameId, qint64 context, const QVariant & result)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5bf9\u4f7f\u7528 ",(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ad4f331cdfc2ca2ed0ab019d2c8857065"},"executeJavascriptWithResult")," \u6267\u884c\u7684 javascript \u7684\u7ed3\u679c\u8fdb\u884c\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a543b0eca797c5161d6325665d5ddd576"},(0,i.kt)("inlineCode",{parentName:"a"},"nativeBrowserCreated")),(0,i.kt)("inlineCode",{parentName:"td"},"(QWindow * window)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u521b\u5efa\u539f\u751f\u6d4f\u89c8\u5668\u7a97\u53e3\u540e\u8c03\u7528\u3002\u4e0d\u9002\u7528\u4e8e OSR \u6a21\u5f0f\u3002")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{signal} public void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1ab008a40ecfdd9a616e31b401514ac1e3"},(0,i.kt)("inlineCode",{parentName:"a"},"popupCreated")),(0,i.kt)("inlineCode",{parentName:"td"},"("),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefView")),(0,i.kt)("inlineCode",{parentName:"td"}," * popup)")),(0,i.kt)("td",{parentName:"tr",align:null},"\u5728\u521b\u5efa\u5f39\u51fa\u5f0f\u6d4f\u89c8\u5668\u540e\u7acb\u5373\u8c03\u7528")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"{slot} public inline void "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a9b1b42857e38a9f5c6c810fd51593788"},(0,i.kt)("inlineCode",{parentName:"a"},"setFocus")),(0,i.kt)("inlineCode",{parentName:"td"},"()")),(0,i.kt)("td",{parentName:"tr",align:null},"\u8bf7\u53c2\u8003",(0,i.kt)("inlineCode",{parentName:"td"},"QWidget::setFocus"))),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"enum "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a9963d810f8aa71b45b1b10f0abbe8787"},(0,i.kt)("inlineCode",{parentName:"a"},"CefWindowOpenDisposition"))),(0,i.kt)("td",{parentName:"tr",align:null},"\u8868\u793a CEF \u5f39\u51fa\u7a97\u53e3\u7684\u6253\u5f00\u914d\u7f6e")),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},(0,i.kt)("inlineCode",{parentName:"td"},"private QScopedPointer< QCefViewPrivate > "),(0,i.kt)("a",{parentName:"td",href:"#class_q_cef_view_1a6882524bec20e1620311b3853750638f"},(0,i.kt)("inlineCode",{parentName:"a"},"d_ptr"))),(0,i.kt)("td",{parentName:"tr",align:null})))),(0,i.kt)("h2",{id:"members"},"Members"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ad1e23ad619da083eefa20a14ba38a228"},(0,i.kt)("inlineCode",{parentName:"h3"},"public "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ad1e23ad619da083eefa20a14ba38a228"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefView")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString url, const "),(0,i.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefSetting#class_q_cef_setting"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefSetting")),(0,i.kt)("inlineCode",{parentName:"h3"}," * setting, QWidget * parent, Qt::WindowFlags f)")),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"#class_q_cef_view"},"QCefView")," \u6709\u53c2\u6784\u9020\u51fd\u6570"),(0,i.kt)("h4",{id:"\u53c2\u6570"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"url")," \u76ee\u6807\u7f51\u5740")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"setting")," ",(0,i.kt)("a",{parentName:"p",href:"/QCefView/zh/docs/reference/QCefSetting#class_q_cef_setting"},"QCefSetting")," \u5b9e\u4f8b")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"parent")," \u7236\u5bf9\u8c61"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a11c38eefb7b152dbf73620cb23922df0"},(0,i.kt)("inlineCode",{parentName:"h3"},"public "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a11c38eefb7b152dbf73620cb23922df0"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefView")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QWidget * parent, Qt::WindowFlags f)")),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"#class_q_cef_view"},"QCefView")," \u6709\u53c2\u6784\u9020\u51fd\u6570"),(0,i.kt)("h4",{id:"\u53c2\u6570-1"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"parent")," \u7236\u5bf9\u8c61")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a70903dca8ccd3e2776d68742531177fd"},(0,i.kt)("inlineCode",{parentName:"h3"},"public "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a70903dca8ccd3e2776d68742531177fd"},(0,i.kt)("inlineCode",{parentName:"a"},"~QCefView")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"#class_q_cef_view"},"QCefView")," \u6790\u6784\u51fd\u6570"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a8c6286b279094a691832fc89b93c75f1"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a8c6286b279094a691832fc89b93c75f1"},(0,i.kt)("inlineCode",{parentName:"a"},"addLocalFolderResource")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString & path, const QString & url, int priority)")),(0,i.kt)("p",null,"\u6dfb\u52a0\u5177\u6709\u672c\u5730 Web \u8d44\u6e90\u76ee\u5f55\u7684 url \u6620\u5c04\u9879"),(0,i.kt)("h4",{id:"\u53c2\u6570-2"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"path")," \u672c\u5730\u8d44\u6e90\u76ee\u5f55\u7684\u8def\u5f84")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"url")," \u8981\u6620\u5c04\u5230\u7684\u7f51\u5740")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"priority")," \u4f18\u5148\u7ea7"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a503148f8ff5ca5b28d3f0e123bf5bf76"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a503148f8ff5ca5b28d3f0e123bf5bf76"},(0,i.kt)("inlineCode",{parentName:"a"},"addArchiveResource")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString & path, const QString & url, const QString & password, int priority)")),(0,i.kt)("p",null,"\u4f7f\u7528\u5305\u542b Web \u8d44\u6e90\u7684\u672c\u5730\u5b58\u6863 \uff08.zip\uff09 \u6587\u4ef6\u6dfb\u52a0 url \u6620\u5c04\u9879"),(0,i.kt)("h4",{id:"\u53c2\u6570-3"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"path")," \u672c\u5730\u5b58\u6863\u6587\u4ef6\u7684\u8def\u5f84")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"url")," \u8981\u6620\u5c04\u5230\u7684\u7f51\u5740")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"password")," \u5b58\u6863\u7684\u5bc6\u7801")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"priority")," \u4f18\u5148\u7ea7"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ae4aa1652bf9852ed744dd38487bbb748"},(0,i.kt)("inlineCode",{parentName:"h3"},"public int "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ae4aa1652bf9852ed744dd38487bbb748"},(0,i.kt)("inlineCode",{parentName:"a"},"browserId")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u83b7\u53d6\u6d4f\u89c8\u5668 ID"),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u6d4f\u89c8\u5668 ID \u6807\u8bc6"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a532ffb1fb0090dd866454234d518619c"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a532ffb1fb0090dd866454234d518619c"},(0,i.kt)("inlineCode",{parentName:"a"},"isPopup")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u83b7\u53d6\u6d4f\u89c8\u5668\u662f\u5426\u521b\u5efa\u4e3a\u5f39\u51fa\u5f0f\u6d4f\u89c8\u5668"),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-1"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u5982\u679c\u662f\u5f39\u51fa\u5f0f\u6d4f\u89c8\u5668\uff0c\u5219\u4e3a true;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ac3b8ec3b088422a67f93fc580047a1a0"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ac3b8ec3b088422a67f93fc580047a1a0"},(0,i.kt)("inlineCode",{parentName:"a"},"navigateToString")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString & content)")),(0,i.kt)("p",null,"\u5bfc\u822a\u5230\u5185\u5bb9"),(0,i.kt)("h4",{id:"\u53c2\u6570-4"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"content")," \u5185\u5bb9")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a4bf036d5a7d128d4c1487afaa0393d5b"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a4bf036d5a7d128d4c1487afaa0393d5b"},(0,i.kt)("inlineCode",{parentName:"a"},"navigateToUrl")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString & url)")),(0,i.kt)("p",null,"\u5bfc\u822a\u5230\u7f51\u5740"),(0,i.kt)("h4",{id:"\u53c2\u6570-5"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"url")," \u7f51\u5740")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a01100f7ab97f9f643e4f23af5cea9900"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a01100f7ab97f9f643e4f23af5cea9900"},(0,i.kt)("inlineCode",{parentName:"a"},"browserCanGoBack")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u68c0\u67e5\u6d4f\u89c8\u5668\u662f\u5426\u53ef\u4ee5\u8fd4\u56de"),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-2"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u5982\u679c\u53ef\u4ee5\uff0c\u5219\u4e3atrue;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ae1d6a6d94e02a54654463e5b0c491624"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ae1d6a6d94e02a54654463e5b0c491624"},(0,i.kt)("inlineCode",{parentName:"a"},"browserCanGoForward")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u68c0\u67e5\u6d4f\u89c8\u5668\u662f\u5426\u53ef\u4ee5\u524d\u8fdb"),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-3"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u5982\u679c\u53ef\u4ee5\uff0c\u5219\u4e3atrue;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1aa82e1ceaa7f543f8d99d7d9cbf714382"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1aa82e1ceaa7f543f8d99d7d9cbf714382"},(0,i.kt)("inlineCode",{parentName:"a"},"browserGoBack")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u8981\u6c42\u6d4f\u89c8\u5668\u8fd4\u56de"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a9ce96fbf25701594b8d65381661141db"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a9ce96fbf25701594b8d65381661141db"},(0,i.kt)("inlineCode",{parentName:"a"},"browserGoForward")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u8981\u6c42\u6d4f\u89c8\u5668\u524d\u8fdb"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a12ca0bc0f4fc55dfc838769990d6a6d7"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a12ca0bc0f4fc55dfc838769990d6a6d7"},(0,i.kt)("inlineCode",{parentName:"a"},"browserIsLoading")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u68c0\u67e5\u6d4f\u89c8\u5668\u662f\u5426\u6b63\u5728\u52a0\u8f7d"),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-4"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u5982\u679c\u6b63\u5728\u52a0\u8f7d\uff0c\u5219\u4e3a true;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a45bc8cd7340ce410cf873d7296ffacf6"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a45bc8cd7340ce410cf873d7296ffacf6"},(0,i.kt)("inlineCode",{parentName:"a"},"browserReload")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u8981\u6c42\u6d4f\u89c8\u5668\u91cd\u65b0\u52a0\u8f7d"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1afadd210f3c5cd95598b18aa158a9c16f"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1afadd210f3c5cd95598b18aa158a9c16f"},(0,i.kt)("inlineCode",{parentName:"a"},"browserStopLoad")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u8981\u6c42\u6d4f\u89c8\u5668\u505c\u6b62\u52a0\u8f7d"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ac47c23ffcd94bdffe2b6a81eaae077a2"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ac47c23ffcd94bdffe2b6a81eaae077a2"},(0,i.kt)("inlineCode",{parentName:"a"},"triggerEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const "),(0,i.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefEvent#class_q_cef_event"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefEvent")),(0,i.kt)("inlineCode",{parentName:"h3"}," & event)")),(0,i.kt)("p",null,"\u89e6\u53d1\u4e3b\u6846\u67b6\u7684\u4e8b\u4ef6"),(0,i.kt)("h4",{id:"\u53c2\u6570-6"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"event")," ",(0,i.kt)("a",{parentName:"li",href:"/QCefView/zh/docs/reference/QCefEvent#class_q_cef_event"},"QCefEvent")," \u5b9e\u4f8b")),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-5"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u6210\u529f\u65f6\u4e3atrue;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ab6afab6f26fb1a1b4f3b25d2fe9c2f13"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ab6afab6f26fb1a1b4f3b25d2fe9c2f13"},(0,i.kt)("inlineCode",{parentName:"a"},"triggerEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const "),(0,i.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefEvent#class_q_cef_event"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefEvent")),(0,i.kt)("inlineCode",{parentName:"h3"}," & event, qint64 frameId)")),(0,i.kt)("p",null,"\u89e6\u53d1\u6307\u5b9aframe\u7684\u4e8b\u4ef6"),(0,i.kt)("h4",{id:"\u53c2\u6570-7"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"event")," The ",(0,i.kt)("a",{parentName:"p",href:"/QCefView/zh/docs/reference/QCefEvent#class_q_cef_event"},"QCefEvent")," instance")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," frame ID"))),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-6"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u6210\u529f\u65f6\u4e3atrue;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ad5455e3a8cb0ffa1f9d7cb98307a6bb4"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ad5455e3a8cb0ffa1f9d7cb98307a6bb4"},(0,i.kt)("inlineCode",{parentName:"a"},"broadcastEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const "),(0,i.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefEvent#class_q_cef_event"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefEvent")),(0,i.kt)("inlineCode",{parentName:"h3"}," & event)")),(0,i.kt)("p",null,"\u4e3a\u6240\u6709frame\u5e7f\u64ad\u4e8b\u4ef6"),(0,i.kt)("h4",{id:"\u53c2\u6570-8"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"event")," ",(0,i.kt)("a",{parentName:"li",href:"/QCefView/zh/docs/reference/QCefEvent#class_q_cef_event"},"QCefEvent")," \u5b9e\u4f8b")),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-7"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u6210\u529f\u65f6\u4e3atrue;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1afc838dab54d2b083b05f0d98349b50cc"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1afc838dab54d2b083b05f0d98349b50cc"},(0,i.kt)("inlineCode",{parentName:"a"},"responseQCefQuery")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const "),(0,i.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefQuery#class_q_cef_query"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefQuery")),(0,i.kt)("inlineCode",{parentName:"h3"}," & query)")),(0,i.kt)("p",null,"\u54cd\u5e94 ",(0,i.kt)("a",{parentName:"p",href:"/QCefView/zh/docs/reference/QCefQuery#class_q_cef_query"},"QCefQuery")," \u8bf7\u6c42"),(0,i.kt)("h4",{id:"\u53c2\u6570-9"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"query")," ",(0,i.kt)("a",{parentName:"li",href:"/QCefView/zh/docs/reference/QCefQuery#class_q_cef_query"},"QCefQuery")," \u5b9e\u4f8b")),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-8"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u6210\u529f\u65f6\u4e3atrue;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a79a5f1f466b1e8b96c89b24058194fe8"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a79a5f1f466b1e8b96c89b24058194fe8"},(0,i.kt)("inlineCode",{parentName:"a"},"executeJavascript")),(0,i.kt)("inlineCode",{parentName:"h3"},"(qint64 frameId, const QString & code, const QString & url)")),(0,i.kt)("p",null,"\u5728\u6307\u5b9a\u7684frame\u4e2d\u6267\u884cjavascript\u4ee3\u7801\uff0c\u6b64\u65b9\u6cd5\u4e0d\u62a5\u544ajavascript\u7684\u7ed3\u679c\u3002\u8981\u83b7\u53d6 javascript \u6267\u884c\u7684\u7ed3\u679c\uff0c\u8bf7\u4f7f\u7528 ",(0,i.kt)("a",{parentName:"p",href:"#class_q_cef_view_1ad4f331cdfc2ca2ed0ab019d2c8857065"},"executeJavascriptWithResult")),(0,i.kt)("h4",{id:"\u53c2\u6570-10"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," frame ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"code")," JavaScript\u4ee3\u7801")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"url")," \u53ef\u5728\u5176\u4e2d\u627e\u5230\u76f8\u5173\u811a\u672c\u7684 URL\uff08\u5982\u679c\u6709\uff09\u3002\u6e32\u67d3\u5668\u53ef\u80fd\u4f1a\u8bf7\u6c42\u6b64 URL \u4ee5\u5411\u5f00\u53d1\u4eba\u5458\u663e\u793a\u9519\u8bef\u7684\u6765\u6e90"))),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-9"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u6210\u529f\u65f6\u4e3atrue;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ad4f331cdfc2ca2ed0ab019d2c8857065"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ad4f331cdfc2ca2ed0ab019d2c8857065"},(0,i.kt)("inlineCode",{parentName:"a"},"executeJavascriptWithResult")),(0,i.kt)("inlineCode",{parentName:"h3"},"(qint64 frameId, const QString & code, const QString & url, qint64 context)")),(0,i.kt)("p",null,"\u5728\u6307\u5b9a\u7684frame\u4e2d\u6267\u884cjavascript\u4ee3\u7801\uff0c\u7ed3\u679c\u5c06\u901a\u8fc7 ",(0,i.kt)("a",{parentName:"p",href:"#class_q_cef_view_1a3e5b637b042a2d17946a884f9bfc9bf0"},"reportJavascriptResult")," \u4fe1\u53f7\u53d1\u9001"),(0,i.kt)("h4",{id:"\u53c2\u6570-11"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," frame ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"code")," JavaScript \u4ee3\u7801")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"url")," \u53ef\u5728\u5176\u4e2d\u627e\u5230\u76f8\u5173\u811a\u672c\u7684 URL\uff08\u5982\u679c\u6709\uff09\u3002\u6e32\u67d3\u5668\u53ef\u80fd\u4f1a\u8bf7\u6c42\u6b64 URL \u4ee5\u5411\u5f00\u53d1\u4eba\u5458\u663e\u793a\u9519\u8bef\u7684\u6765\u6e90")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"context")," \u7528\u4e8e\u6807\u8bc6\u4e00\u4e2a\u6267\u884c\u7684\u4e0a\u4e0b\u6587"))),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-10"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u6210\u529f\u65f6\u4e3atrue;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a2b4b3da8874855bbe2d558081233d948"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a2b4b3da8874855bbe2d558081233d948"},(0,i.kt)("inlineCode",{parentName:"a"},"setPreference")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString & name, const QVariant & value, const QString & error)")),(0,i.kt)("p",null,"\u8bbe\u7f6e\u6b64\u6d4f\u89c8\u5668\u7684\u9996\u9009\u9879"),(0,i.kt)("h4",{id:"\u53c2\u6570-12"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"name")," \u9996\u9009\u9879\u540d\u79f0"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"value")," \u9996\u9009\u9879\u503c\uff0c\u5982\u679c\u6b64\u503c\u4e3a ",(0,i.kt)("inlineCode",{parentName:"li"},"QVariant::UnknownType")," \u6216\u8005 ",(0,i.kt)("inlineCode",{parentName:"li"},"QVariant::Invalid"),", \u5219\u9996\u9009\u9879\u5c06\u6062\u590d\u4e3a\u9ed8\u8ba4\u503c"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"error")," \u5931\u8d25\u65f6\u586b\u5145\u7684\u9519\u8bef\u6d88\u606f")),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-11"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u6210\u529f\u65f6\u4e3atrue;\u5426\u5219\u4e3afalse"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1acca71443b26dce09e81e3f937cedaa6b"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1acca71443b26dce09e81e3f937cedaa6b"},(0,i.kt)("inlineCode",{parentName:"a"},"setDisablePopupContextMenu")),(0,i.kt)("inlineCode",{parentName:"h3"},"(bool disable)")),(0,i.kt)("p",null,"\u8bbe\u7f6e\u662f\u5426\u7981\u7528\u5f39\u51fa\u6d4f\u89c8\u5668\u7684\u4e0a\u4e0b\u6587\u83dc\u5355"),(0,i.kt)("h4",{id:"\u53c2\u6570-13"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"disable")," True \u8868\u793a\u7981\u7528;false \u8868\u793a\u542f\u7528")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1abb79735affb74166c0bed7f361ce1388"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1abb79735affb74166c0bed7f361ce1388"},(0,i.kt)("inlineCode",{parentName:"a"},"isPopupContextMenuDisabled")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null," \u83b7\u53d6\u662f\u5426\u7981\u7528\u5f39\u51fa\u6d4f\u89c8\u5668\u7684\u4e0a\u4e0b\u6587\u83dc\u5355"),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-12"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"True \u8868\u793a\u7981\u7528;false \u8868\u793a\u542f\u7528"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a85fd904cbd3b91a72ce090cffb0119c8"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a85fd904cbd3b91a72ce090cffb0119c8"},(0,i.kt)("inlineCode",{parentName:"a"},"hasDevTools")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u68c0\u6d4b\u6b64\u6d4f\u89c8\u5668\u662f\u5426\u6253\u5f00\u4e86devtools"),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-13"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u5982\u679c\u5df2\u7ecf\u6253\u5f00\uff0c\u5219\u4e3a true; \u5426\u5219\u4e3a false"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a61845e6e370a57be5f3662ba37cd7b29"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a61845e6e370a57be5f3662ba37cd7b29"},(0,i.kt)("inlineCode",{parentName:"a"},"showDevTools")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u6253\u5f00 devtools \u5bf9\u8bdd\u6846"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1abdf0a68139fe9163ecd9b5a0cdeed6d7"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1abdf0a68139fe9163ecd9b5a0cdeed6d7"},(0,i.kt)("inlineCode",{parentName:"a"},"closeDevTools")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("p",null,"\u5173\u95ed devtools \u5bf9\u8bdd\u6846"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1af73ef1d6f77a31b528c729cf7379abfb"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1af73ef1d6f77a31b528c729cf7379abfb"},(0,i.kt)("inlineCode",{parentName:"a"},"setEnableDragAndDrop")),(0,i.kt)("inlineCode",{parentName:"h3"},"(bool enable)")),(0,i.kt)("p",null,"\u8bbe\u7f6e\u662f\u5426\u542f\u7528\u62d6\u62fd"),(0,i.kt)("h4",{id:"\u53c2\u6570-14"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"enable")," True \u8868\u793a\u542f\u7528;false \u8868\u793a\u7981\u7528")),(0,i.kt)("p",null,"\u4e0d\u9002\u7528\u4e8eOSR\u6a21\u5f0f\u3002\u6ce8\u610f\u8fd9\u91cc\u6709\u4e00\u4e2a\u95ee\u9898\uff0c\u5f53\u5c06\u6587\u4ef6\u62d6\u52a8\u5230\u975e\u62d6\u52a8\u533a\u57df\u65f6\uff0c\u5c06\u663e\u793a\u8be5\u6587\u4ef6\u7684\u5185\u5bb9\u3002\u4f60\u9700\u8981\u81ea\u5df1\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a2a8a2ebaedb88ccd80536c66d878ff8a"},(0,i.kt)("inlineCode",{parentName:"h3"},"public bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a2a8a2ebaedb88ccd80536c66d878ff8a"},(0,i.kt)("inlineCode",{parentName:"a"},"isDragAndDropEnabled")),(0,i.kt)("inlineCode",{parentName:"h3"},"() const")),(0,i.kt)("p",null,"\u83b7\u53d6\u662f\u5426\u542f\u7528\u62d6\u62fd"),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-14"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"True \u8868\u793a\u542f\u7528;false \u8868\u793a\u7981\u7528"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a61ad737cd2354021f8310f323f4f8ada"},(0,i.kt)("inlineCode",{parentName:"h3"},"public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a61ad737cd2354021f8310f323f4f8ada"},(0,i.kt)("inlineCode",{parentName:"a"},"setFocus")),(0,i.kt)("inlineCode",{parentName:"h3"},"(Qt::FocusReason reason)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 ",(0,i.kt)("inlineCode",{parentName:"p"},"QWidget::setFocus")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1af25a011c126a9bb5dc3df99756a75368"},(0,i.kt)("inlineCode",{parentName:"h3"},"public QVariant "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1af25a011c126a9bb5dc3df99756a75368"},(0,i.kt)("inlineCode",{parentName:"a"},"inputMethodQuery")),(0,i.kt)("inlineCode",{parentName:"h3"},"(Qt::InputMethodQuery query) const")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::inputMethodQuery"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a2889f3055a30625f39cecb697c15aa04"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected virtual bool "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a2889f3055a30625f39cecb697c15aa04"},(0,i.kt)("inlineCode",{parentName:"a"},"onBeforePopup")),(0,i.kt)("inlineCode",{parentName:"h3"},"(qint64 frameId, const QString & targetUrl, const QString & targetFrameName, "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a9963d810f8aa71b45b1b10f0abbe8787"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefView::CefWindowOpenDisposition")),(0,i.kt)("inlineCode",{parentName:"h3"},"targetDisposition, QRect & rect,"),(0,i.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefSetting#class_q_cef_setting"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefSetting")),(0,i.kt)("inlineCode",{parentName:"h3"}," & settings)")),(0,i.kt)("p",null," \u5728\u521b\u5efa\u5f39\u51fa\u5f0f\u6d4f\u89c8\u5668\u4e4b\u524d\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-15"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," \u6e90frame ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"targetUrl")," \u76ee\u6807\u7f51\u5740")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"targetFrameName")," \u76ee\u6807\u540d\u79f0")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"targetDisposition")," \u76ee\u6807\u7a97\u53e3\u6253\u5f00\u65b9\u6cd5")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"settings")," \u7528\u4e8e\u5f39\u51fa\u7a97\u53e3\u7684\u8bbe\u7f6e")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"rect")," \u7528\u4e8e\u5f39\u51fa\u7a97\u53e3\u7684\u77e9\u5f62"))),(0,i.kt)("h4",{id:"\u8fd4\u56de\u503c-15"},"\u8fd4\u56de\u503c"),(0,i.kt)("p",null,"\u5982\u679c\u4e3a true\uff0c\u5219\u53d6\u6d88\u5f39\u51fa\u7a97\u53e3;false\u8868\u793a\u5141\u8bb8"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a666e93d6e9f9be7444f9b898f77c8292"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected virtual void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a666e93d6e9f9be7444f9b898f77c8292"},(0,i.kt)("inlineCode",{parentName:"a"},"onNewDownloadItem")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QSharedPointer< "),(0,i.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefDownloadItem#class_q_cef_download_item"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefDownloadItem")),(0,i.kt)("inlineCode",{parentName:"h3"}," > & item, const QString & suggestedName)")),(0,i.kt)("p",null,"\u9700\u8981\u5bf9\u65b0\u4e0b\u8f7d\u9879\u7684\u8c03\u7528\u3002\u4fdd\u7559\u5bf9\u4e0b\u8f7d\u9879\u7684\u5f15\u7528\u5e76\u8c03\u7528 ",(0,i.kt)("a",{parentName:"p",href:"/QCefView/zh/docs/reference/QCefDownloadItem#class_q_cef_download_item_1a315592aa53a2bf7bc8aea717195f5b43"},"QCefDownloadItem::start")," \u65b9\u6cd5\u4ee5\u5141\u8bb8\u5e76\u542f\u52a8\u4e0b\u8f7d\uff0c\u5ffd\u7565\u4e0b\u8f7d\u9879\u4ee5\u7981\u6b62\u4e0b\u8f7d"),(0,i.kt)("h4",{id:"\u53c2\u6570-16"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"item")," \u65b0\u7684\u4e0b\u8f7d\u9879\u76ee")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"suggestedName")," \u65b0\u7684\u5efa\u8bae\u7684\u540d\u79f0"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a9833a1db8ef5864489f9462ef397cbb8"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected virtual void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a9833a1db8ef5864489f9462ef397cbb8"},(0,i.kt)("inlineCode",{parentName:"a"},"onUpdateDownloadItem")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QSharedPointer< "),(0,i.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefDownloadItem#class_q_cef_download_item"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefDownloadItem")),(0,i.kt)("inlineCode",{parentName:"h3"}," > & item)")),(0,i.kt)("p",null,"\u5728\u66f4\u65b0\u4e0b\u8f7d\u9879\u65f6\u8c03\u7528\u3002 \u82e5\u8981\u83b7\u53d6 ",(0,i.kt)("a",{parentName:"p",href:"/QCefView/zh/docs/reference/QCefDownloadItem#class_q_cef_download_item_1a315592aa53a2bf7bc8aea717195f5b43"},"QCefDownloadItem::start")," \u7684\u65b9\u6cd5\uff0c\u5fc5\u987b\u5728 newDownloadItem \u65b9\u6cd5\u4e2d\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-17"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"item")," \u4e0b\u8f7d\u9879\u76ee")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1aa205502bb5238e6e2ce727046ed8a9b8"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1aa205502bb5238e6e2ce727046ed8a9b8"},(0,i.kt)("inlineCode",{parentName:"a"},"paintEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QPaintEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::paintEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a02d713f4a0545e85832b70ddced7e831"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a02d713f4a0545e85832b70ddced7e831"},(0,i.kt)("inlineCode",{parentName:"a"},"inputMethodEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QInputMethodEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::inputMethodEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a08dcba31e0d2860270ab3cd8055a5c4e"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a08dcba31e0d2860270ab3cd8055a5c4e"},(0,i.kt)("inlineCode",{parentName:"a"},"showEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QShowEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::showEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1af2432e14ac8d9156594c3941ff6b4d14"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1af2432e14ac8d9156594c3941ff6b4d14"},(0,i.kt)("inlineCode",{parentName:"a"},"hideEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QHideEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::hideEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a05bf10e1e318cf9cc4ad742ad61c9706"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a05bf10e1e318cf9cc4ad742ad61c9706"},(0,i.kt)("inlineCode",{parentName:"a"},"focusInEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QFocusEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::focusInEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a414b4c9efe5edd10c324c1e35e12d07c"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a414b4c9efe5edd10c324c1e35e12d07c"},(0,i.kt)("inlineCode",{parentName:"a"},"focusOutEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QFocusEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::focusOutEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a237797e9f77342d72c35a8017865988e"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a237797e9f77342d72c35a8017865988e"},(0,i.kt)("inlineCode",{parentName:"a"},"resizeEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QResizeEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::resizeEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a6aa89a0ce04dac5aa2c01545253ffc56"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a6aa89a0ce04dac5aa2c01545253ffc56"},(0,i.kt)("inlineCode",{parentName:"a"},"keyPressEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QKeyEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::keyPressEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ab2d8e99188937bba13893ce6c54f9a3f"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ab2d8e99188937bba13893ce6c54f9a3f"},(0,i.kt)("inlineCode",{parentName:"a"},"keyReleaseEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QKeyEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::keyReleaseEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a3bd541e981d7dbad0deceb64df0d3a5b"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a3bd541e981d7dbad0deceb64df0d3a5b"},(0,i.kt)("inlineCode",{parentName:"a"},"mouseMoveEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QMouseEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::mouseMoveEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1aac476c39493a4e75e681b9e09f13e060"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1aac476c39493a4e75e681b9e09f13e060"},(0,i.kt)("inlineCode",{parentName:"a"},"mousePressEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QMouseEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::mousePressEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a69306a82128ba3e525103eb132aae62c"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a69306a82128ba3e525103eb132aae62c"},(0,i.kt)("inlineCode",{parentName:"a"},"mouseReleaseEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QMouseEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::mouseReleaseEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a3395f62959288420a834c736933e7228"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a3395f62959288420a834c736933e7228"},(0,i.kt)("inlineCode",{parentName:"a"},"wheelEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QWheelEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::wheelEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ac8a83d1f2fb0e771fb48007838b40d1f"},(0,i.kt)("inlineCode",{parentName:"h3"},"protected void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ac8a83d1f2fb0e771fb48007838b40d1f"},(0,i.kt)("inlineCode",{parentName:"a"},"contextMenuEvent")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QContextMenuEvent * event)")),(0,i.kt)("p",null,"\u8bf7\u53c2\u8003 QWidget::contextMenuEvent"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1afb28155fd58760bd84cf45f634e054b5"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1afb28155fd58760bd84cf45f634e054b5"},(0,i.kt)("inlineCode",{parentName:"a"},"loadingStateChanged")),(0,i.kt)("inlineCode",{parentName:"h3"},"(int browserId, bool isLoading, bool canGoBack, bool canGoForward)")),(0,i.kt)("p",null,"\u52a0\u8f7d\u72b6\u6001\u66f4\u6539\u65f6\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-18"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"browserId")," \u8868\u793a\u6d4f\u89c8\u5668 ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"isLoading")," \u8868\u793a\u6d4f\u89c8\u5668\u6b63\u5728\u52a0\u8f7d")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"canGoBack")," \u8868\u793a\u6d4f\u89c8\u5668\u53ef\u4ee5\u8fd4\u56de")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"canGoForward")," \u8868\u793a\u6d4f\u89c8\u5668\u53ef\u4ee5\u524d\u8fdb"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a0165da07749c09130e0007a4ceff59ca"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a0165da07749c09130e0007a4ceff59ca"},(0,i.kt)("inlineCode",{parentName:"a"},"loadStart")),(0,i.kt)("inlineCode",{parentName:"h3"},"(int browserId, qint64 frameId, bool isMainFrame, int transitionType)")),(0,i.kt)("p",null,"\u5728\u52a0\u8f7d\u5f00\u59cb\u65f6\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-19"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"browserId")," \u8868\u793a\u6d4f\u89c8\u5668 ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," \u8868\u793aframe ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"isMainFrame")," \u8868\u793a\u8fd9\u662f\u5426\u662f\u4e3bframe")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"transition_type")," \u8fc7\u6e21\u7c7b\u578b"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a5d64cbb95348336b85cb01f38de91e0a"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a5d64cbb95348336b85cb01f38de91e0a"},(0,i.kt)("inlineCode",{parentName:"a"},"loadEnd")),(0,i.kt)("inlineCode",{parentName:"h3"},"(int browserId, qint64 frameId, bool isMainFrame, int httpStatusCode)")),(0,i.kt)("p",null,"\u5728\u52a0\u8f7d\u7ed3\u675f\u65f6\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-20"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"browserId")," \u8868\u793a\u6d4f\u89c8\u5668 ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," \u8868\u793aframe ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"isMainFrame")," \u8868\u793a\u8fd9\u662f\u5426\u662f\u4e3bframe")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"httpStatusCode")," HTTP \u72b6\u6001\u4ee3\u7801"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a81ad0ea96d09d7ba705c4166502507e4"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a81ad0ea96d09d7ba705c4166502507e4"},(0,i.kt)("inlineCode",{parentName:"a"},"loadError")),(0,i.kt)("inlineCode",{parentName:"h3"},"(int browserId, qint64 frameId, bool isMainFrame, int errorCode, const QString & errorMsg, const QString & failedUrl)")),(0,i.kt)("p",null,"\u7531\u4e8e\u9519\u8bef\u5bfc\u81f4\u52a0\u8f7d\u5931\u8d25\u65f6\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-21"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"browserId")," \u8868\u793a\u6d4f\u89c8\u5668 ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," \u8868\u793aframe ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"isMainFrame")," \u8868\u793a\u8fd9\u662f\u5426\u662f\u4e3bframe")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"errorCode")," \u9519\u8bef\u4ee3\u7801")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"errorMsg")," \u9519\u8bef\u6d88\u606f")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"failedUrl")," \u5bfc\u81f4\u5931\u8d25\u7684\u7f51\u5740"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ae11274817f627abf9d407e12dcd5c050"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ae11274817f627abf9d407e12dcd5c050"},(0,i.kt)("inlineCode",{parentName:"a"},"draggableRegionChanged")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QRegion & draggableRegion, const QRegion & nonDraggableRegion)")),(0,i.kt)("p",null,"\u5728\u53ef\u62d6\u52a8\u533a\u57df\u66f4\u6539\u65f6\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-22"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"draggableRegion")," \u65b0\u7684\u53ef\u62d6\u52a8\u533a\u57df")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"nonDraggableRegion")," \u65b0\u7684\u4e0d\u53ef\u62d6\u52a8\u533a\u57df"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a89ce3bc031d5dcd1115482118a6c4181"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a89ce3bc031d5dcd1115482118a6c4181"},(0,i.kt)("inlineCode",{parentName:"a"},"addressChanged")),(0,i.kt)("inlineCode",{parentName:"h3"},"(qint64 frameId, const QString & url)")),(0,i.kt)("p",null,"\u5728\u7f51\u5740\u66f4\u6539\u65f6\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-23"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," frame ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"url")," \u7f51\u5740"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a48c82c208cab769a1baa7177bc58b030"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a48c82c208cab769a1baa7177bc58b030"},(0,i.kt)("inlineCode",{parentName:"a"},"titleChanged")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString & title)")),(0,i.kt)("p",null,"\u7f51\u7ad9\u6807\u9898\u66f4\u6539\u65f6\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-24"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"title")," \u7f51\u7ad9\u6807\u9898")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a7b9e104469c1a4a203c2e1d7e9cfd2a7"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a7b9e104469c1a4a203c2e1d7e9cfd2a7"},(0,i.kt)("inlineCode",{parentName:"a"},"faviconURLChanged")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QStringList & urls)")),(0,i.kt)("p",null,"\u7f51\u7ad9\u56fe\u6807\u5730\u5740\u66f4\u6539\u65f6\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-25"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"urls")," \u56fe\u6807\u5730\u5740")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1aa5d4a7098414f929a4ca7dd6b72d0893"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1aa5d4a7098414f929a4ca7dd6b72d0893"},(0,i.kt)("inlineCode",{parentName:"a"},"faviconChanged")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QIcon & icon)")),(0,i.kt)("p",null,"\u7f51\u7ad9\u56fe\u6807\u66f4\u6539\u65f6\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-26"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"icon")," \u56fe\u6807")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1afa0fbb5b4c2c6c3592085e9b94dffc4a"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1afa0fbb5b4c2c6c3592085e9b94dffc4a"},(0,i.kt)("inlineCode",{parentName:"a"},"fullscreenModeChanged")),(0,i.kt)("inlineCode",{parentName:"h3"},"(bool fullscreen)")),(0,i.kt)("p",null,"\u5728\u5168\u5c4f\u6a21\u5f0f\u66f4\u6539\u65f6\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-27"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"fullscreen")," \u5f53\u524d\u5168\u5c4f\u6a21\u5f0f")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a86d10c28b8821a36723e3504fa0cc7e7"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a86d10c28b8821a36723e3504fa0cc7e7"},(0,i.kt)("inlineCode",{parentName:"a"},"statusMessage")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString & message)")),(0,i.kt)("p",null,"\u72b6\u6001\u6d88\u606f\u66f4\u6539\u65f6\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-28"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"message")," \u72b6\u6001\u4fe1\u606f")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a2dae6946082712815273c2967d37762a"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a2dae6946082712815273c2967d37762a"},(0,i.kt)("inlineCode",{parentName:"a"},"consoleMessage")),(0,i.kt)("inlineCode",{parentName:"h3"},"(const QString & message, int level)")),(0,i.kt)("p",null,"\u4ece Web \u5185\u5bb9\u8c03\u7528\u63a7\u5236\u53f0\u6d88\u606f"),(0,i.kt)("h4",{id:"\u53c2\u6570-29"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"message")," \u6d88\u606f")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"level")," \u7ea7\u522b"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ac7377eeed6811bafca1e6887b64d62a5"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ac7377eeed6811bafca1e6887b64d62a5"},(0,i.kt)("inlineCode",{parentName:"a"},"loadingProgressChanged")),(0,i.kt)("inlineCode",{parentName:"h3"},"(double progress)")),(0,i.kt)("p",null,"\u52a0\u8f7d\u8fdb\u5ea6\u66f4\u6539\u65f6\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-30"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"progress")," \u5f53\u524d\u8fdb\u5ea6")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a9085b5e19ee6eb1306ec29e40f09c6e3"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a9085b5e19ee6eb1306ec29e40f09c6e3"},(0,i.kt)("inlineCode",{parentName:"a"},"cefQueryRequest")),(0,i.kt)("inlineCode",{parentName:"h3"},"(int browserId, qint64 frameId, const "),(0,i.kt)("a",{parentName:"h3",href:"/QCefView/zh/docs/reference/QCefQuery#class_q_cef_query"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefQuery")),(0,i.kt)("inlineCode",{parentName:"h3"}," & query)")),(0,i.kt)("p",null,"\u5728\u65b0\u7684 ",(0,i.kt)("a",{parentName:"p",href:"/QCefView/zh/docs/reference/QCefQuery#class_q_cef_query"},"QCefQuery")," \u8bf7\u6c42\u4e0a\u88ab\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-31"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"browserId")," \u6d4f\u89c8\u5668 ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," frame ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"query")," \u67e5\u8be2\u8bf7\u6c42"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a221d07818d4f6766f72c68319fecc24e"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a221d07818d4f6766f72c68319fecc24e"},(0,i.kt)("inlineCode",{parentName:"a"},"invokeMethod")),(0,i.kt)("inlineCode",{parentName:"h3"},"(int browserId, qint64 frameId, const QString & method, const QVariantList & arguments)")),(0,i.kt)("p",null,"\u5728\u4ece Web \u5185\u5bb9\u8c03\u7528\u65b9\u6cd5\u8bf7\u6c42\u65f6\u8c03\u7528\uff08Javascript\uff09"),(0,i.kt)("h4",{id:"\u53c2\u6570-32"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"browserId")," \u6d4f\u89c8\u5668 ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," frame ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"method")," \u65b9\u6cd5\u540d\u79f0")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"arguments")," \u53c2\u6570\u5217\u8868"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a3e5b637b042a2d17946a884f9bfc9bf0"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a3e5b637b042a2d17946a884f9bfc9bf0"},(0,i.kt)("inlineCode",{parentName:"a"},"reportJavascriptResult")),(0,i.kt)("inlineCode",{parentName:"h3"},"(int browserId, qint64 frameId, qint64 context, const QVariant & result)")),(0,i.kt)("p",null,"\u5bf9\u4f7f\u7528 ",(0,i.kt)("a",{parentName:"p",href:"#class_q_cef_view_1ad4f331cdfc2ca2ed0ab019d2c8857065"},"executeJavascriptWithResult")," \u6267\u884c\u7684 javascript \u7684\u7ed3\u679c\u8fdb\u884c\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-33"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"browserId")," \u6d4f\u89c8\u5668 ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"frameId")," frame ID")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"context")," \u4e0a\u4e0b\u6587")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"result")," \u7ed3\u679c"))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a543b0eca797c5161d6325665d5ddd576"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a543b0eca797c5161d6325665d5ddd576"},(0,i.kt)("inlineCode",{parentName:"a"},"nativeBrowserCreated")),(0,i.kt)("inlineCode",{parentName:"h3"},"(QWindow * window)")),(0,i.kt)("p",null,"\u5728\u521b\u5efa\u539f\u751f\u6d4f\u89c8\u5668\u7a97\u53e3\u540e\u8c03\u7528\u3002\u4e0d\u9002\u7528\u4e8e OSR \u6a21\u5f0f\u3002"),(0,i.kt)("h4",{id:"\u53c2\u6570-34"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"win")," CEF \u7a97\u53e3")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1ab008a40ecfdd9a616e31b401514ac1e3"},(0,i.kt)("inlineCode",{parentName:"h3"},"{signal} public void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1ab008a40ecfdd9a616e31b401514ac1e3"},(0,i.kt)("inlineCode",{parentName:"a"},"popupCreated")),(0,i.kt)("inlineCode",{parentName:"h3"},"("),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view"},(0,i.kt)("inlineCode",{parentName:"a"},"QCefView")),(0,i.kt)("inlineCode",{parentName:"h3"}," * popup)")),(0,i.kt)("p",null,"\u5728\u521b\u5efa\u5f39\u51fa\u5f0f\u6d4f\u89c8\u5668\u540e\u7acb\u5373\u8c03\u7528"),(0,i.kt)("h4",{id:"\u53c2\u6570-35"},"\u53c2\u6570"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"wnd")," \u65b0\u521b\u5efa\u7684\u5f39\u51fa\u5f0f ",(0,i.kt)("a",{parentName:"li",href:"#class_q_cef_view"},"QCefView")," \u5b9e\u4f8b")),(0,i.kt)("p",null,"\u5f39\u51fa\u5f0f\u6d4f\u89c8\u5668\u7684\u751f\u547d\u5468\u671f\u7531\u5f39\u51fa\u5f0f\u6d4f\u89c8\u5668\u7684\u6240\u6709\u8005\u7ba1\u7406\uff0c\u56e0\u6b64\u4e0d\u8981\u5c1d\u8bd5\u4fdd\u5b58\u5f39\u51fa\u5f0f\u6d4f\u89c8\u5668\u5b9e\u4f8b\u3002\u5982\u679c\u60a8\u9700\u8981\u5b9e\u73b0\u6d4f\u89c8\u5668\u9009\u9879\u5361\uff0c\u5219\u5e94\u91cd\u5199 ",(0,i.kt)("a",{parentName:"p",href:"#class_q_cef_view_1a2889f3055a30625f39cecb697c15aa04"},"onBeforePopup")," \u65b9\u6cd5\u5e76\u521b\u5efa\u81ea\u5df1\u7684 ",(0,i.kt)("a",{parentName:"p",href:"#class_q_cef_view"},"QCefView")," \u6d4f\u89c8\u5668\u5b9e\u4f8b\uff0c\u7136\u540e\u60a8\u53ef\u4ee5\u6839\u636e\u9700\u8981\u64cd\u4f5c\u521b\u5efa\u7684\u6d4f\u89c8\u5668\u5b9e\u4f8b\u3002"),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a9b1b42857e38a9f5c6c810fd51593788"},(0,i.kt)("inlineCode",{parentName:"h3"},"{slot} public inline void "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a9b1b42857e38a9f5c6c810fd51593788"},(0,i.kt)("inlineCode",{parentName:"a"},"setFocus")),(0,i.kt)("inlineCode",{parentName:"h3"},"()")),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a9963d810f8aa71b45b1b10f0abbe8787"},(0,i.kt)("inlineCode",{parentName:"h3"},"enum "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a9963d810f8aa71b45b1b10f0abbe8787"},(0,i.kt)("inlineCode",{parentName:"a"},"CefWindowOpenDisposition"))),(0,i.kt)("p",null,"\u8868\u793a CEF \u5f39\u51fa\u7a97\u53e3\u7684\u6253\u5f00\u914d\u7f6e\u679a\u4e3e"),(0,i.kt)("table",null,(0,i.kt)("thead",{parentName:"table"},(0,i.kt)("tr",{parentName:"thead"},(0,i.kt)("th",{parentName:"tr",align:null},"Values"),(0,i.kt)("th",{parentName:"tr",align:null},"Descriptions"))),(0,i.kt)("tbody",{parentName:"table"},(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"CefWindowOpenDispositionUnknown"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"CefWindowOpenDispositionCurrentTab"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"CefWindowOpenDispositionSingletonTab"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"CefWindowOpenDispositionNewForeGroundTab"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"CefWindowOpenDispositionNewBackgroundTab"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"CefWindowOpenDispositionNewPopup"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"CefWindowOpenDispositionNewWindow"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"CefWindowOpenDispositionSaveToDisk"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"CefWindowOpenDispositionOffTheRecord"),(0,i.kt)("td",{parentName:"tr",align:null})),(0,i.kt)("tr",{parentName:"tbody"},(0,i.kt)("td",{parentName:"tr",align:null},"CefWindowOpenDispositionIgnoreAction"),(0,i.kt)("td",{parentName:"tr",align:null})))),(0,i.kt)("hr",null),(0,i.kt)("h3",{id:"class_q_cef_view_1a6882524bec20e1620311b3853750638f"},(0,i.kt)("inlineCode",{parentName:"h3"},"private QScopedPointer< QCefViewPrivate > "),(0,i.kt)("a",{parentName:"h3",href:"#class_q_cef_view_1a6882524bec20e1620311b3853750638f"},(0,i.kt)("inlineCode",{parentName:"a"},"d_ptr"))))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/zh/assets/js/runtime~main.3a8813c3.js b/zh/assets/js/runtime~main.8d7d71fb.js similarity index 98% rename from zh/assets/js/runtime~main.3a8813c3.js rename to zh/assets/js/runtime~main.8d7d71fb.js index 0a51e8d7..47b718cb 100644 --- a/zh/assets/js/runtime~main.3a8813c3.js +++ b/zh/assets/js/runtime~main.8d7d71fb.js @@ -1 +1 @@ -(()=>{"use strict";var e,t,r,o,a,f={},n={};function d(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={id:e,loaded:!1,exports:{}};return f[e].call(r.exports,r,r.exports,d),r.loaded=!0,r.exports}d.m=f,d.c=n,e=[],d.O=(t,r,o,a)=>{if(!r){var f=1/0;for(u=0;u=a)&&Object.keys(d.O).every((e=>d.O[e](r[c])))?r.splice(c--,1):(n=!1,a0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[r,o,a]},d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,d.t=function(e,o){if(1&o&&(e=this(e)),8&o)return e;if("object"==typeof e&&e){if(4&o&&e.__esModule)return e;if(16&o&&"function"==typeof e.then)return e}var a=Object.create(null);d.r(a);var f={};t=t||[null,r({}),r([]),r(r)];for(var n=2&o&&e;"object"==typeof n&&!~t.indexOf(n);n=r(n))Object.getOwnPropertyNames(n).forEach((t=>f[t]=()=>e[t]));return f.default=()=>e,d.d(a,f),a},d.d=(e,t)=>{for(var r in t)d.o(t,r)&&!d.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((t,r)=>(d.f[r](e,t),t)),[])),d.u=e=>"assets/js/"+({32:"349b0b02",53:"935f2afb",54:"0bed074d",76:"8d2f2028",177:"8326e4e5",195:"c4f5d8e4",216:"dc1e63a8",287:"67e37d85",311:"34ec668e",340:"4c071278",344:"c697ee9d",514:"1be78505",548:"24641798",591:"19278b7e",648:"847def2a",742:"41bff2a2",758:"066979e5",789:"644a6959",813:"546bbbf6",918:"17896441",946:"e66b6224",963:"1d2cef8f",974:"d2c62717"}[e]||e)+"."+{32:"24346d5b",53:"66fa9b0c",54:"b8f0033f",76:"13de773d",177:"cc08df03",195:"1ee5ce01",216:"a1b17740",287:"2de94f4b",311:"9df8f6e7",340:"e7569fae",344:"5780baca",514:"1eb05eca",548:"526c827d",591:"6dcde0e3",648:"792faa60",742:"2fe27222",758:"b39d2516",789:"14c6f1a3",813:"d0b44263",918:"0c84bcce",946:"743466d2",963:"3119b443",972:"86918b89",974:"13f7ba1d"}[e]+".js",d.miniCssF=e=>{},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},a="qcefviewdoc:",d.l=(e,t,r,f)=>{if(o[e])o[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 a=o[e];if(delete o[e],n.parentNode&&n.parentNode.removeChild(n),a&&a.forEach((e=>e(r))),t)return t(r)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=l.bind(null,n.onerror),n.onload=l.bind(null,n.onload),c&&document.head.appendChild(n)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.p="/QCefView/zh/",d.gca=function(e){return e={17896441:"918",24641798:"548","349b0b02":"32","935f2afb":"53","0bed074d":"54","8d2f2028":"76","8326e4e5":"177",c4f5d8e4:"195",dc1e63a8:"216","67e37d85":"287","34ec668e":"311","4c071278":"340",c697ee9d:"344","1be78505":"514","19278b7e":"591","847def2a":"648","41bff2a2":"742","066979e5":"758","644a6959":"789","546bbbf6":"813",e66b6224:"946","1d2cef8f":"963",d2c62717:"974"}[e]||e,d.p+d.u(e)},(()=>{var e={303:0,532:0};d.f.j=(t,r)=>{var o=d.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var a=new Promise(((r,a)=>o=e[t]=[r,a]));r.push(o[2]=a);var f=d.p+d.u(t),n=new Error;d.l(f,(r=>{if(d.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var a=r&&("load"===r.type?"missing":r.type),f=r&&r.target&&r.target.src;n.message="Loading chunk "+t+" failed.\n("+a+": "+f+")",n.name="ChunkLoadError",n.type=a,n.request=f,o[1](n)}}),"chunk-"+t,t)}},d.O.j=t=>0===e[t];var t=(t,r)=>{var o,a,f=r[0],n=r[1],c=r[2],i=0;if(f.some((t=>0!==e[t]))){for(o in n)d.o(n,o)&&(d.m[o]=n[o]);if(c)var u=c(d)}for(t&&t(r);i{"use strict";var e,t,r,o,a,f={},n={};function d(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={id:e,loaded:!1,exports:{}};return f[e].call(r.exports,r,r.exports,d),r.loaded=!0,r.exports}d.m=f,d.c=n,e=[],d.O=(t,r,o,a)=>{if(!r){var f=1/0;for(u=0;u=a)&&Object.keys(d.O).every((e=>d.O[e](r[c])))?r.splice(c--,1):(n=!1,a0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[r,o,a]},d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,d.t=function(e,o){if(1&o&&(e=this(e)),8&o)return e;if("object"==typeof e&&e){if(4&o&&e.__esModule)return e;if(16&o&&"function"==typeof e.then)return e}var a=Object.create(null);d.r(a);var f={};t=t||[null,r({}),r([]),r(r)];for(var n=2&o&&e;"object"==typeof n&&!~t.indexOf(n);n=r(n))Object.getOwnPropertyNames(n).forEach((t=>f[t]=()=>e[t]));return f.default=()=>e,d.d(a,f),a},d.d=(e,t)=>{for(var r in t)d.o(t,r)&&!d.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((t,r)=>(d.f[r](e,t),t)),[])),d.u=e=>"assets/js/"+({32:"349b0b02",53:"935f2afb",54:"0bed074d",76:"8d2f2028",177:"8326e4e5",195:"c4f5d8e4",216:"dc1e63a8",287:"67e37d85",311:"34ec668e",340:"4c071278",344:"c697ee9d",514:"1be78505",548:"24641798",591:"19278b7e",648:"847def2a",742:"41bff2a2",758:"066979e5",789:"644a6959",813:"546bbbf6",918:"17896441",946:"e66b6224",963:"1d2cef8f",974:"d2c62717"}[e]||e)+"."+{32:"24346d5b",53:"66fa9b0c",54:"b8f0033f",76:"13de773d",177:"cc08df03",195:"1ee5ce01",216:"a1b17740",287:"2de94f4b",311:"c3dd3739",340:"d53a07de",344:"5780baca",514:"1eb05eca",548:"526c827d",591:"6dcde0e3",648:"792faa60",742:"2fe27222",758:"b39d2516",789:"14c6f1a3",813:"d0b44263",918:"0c84bcce",946:"743466d2",963:"3119b443",972:"86918b89",974:"13f7ba1d"}[e]+".js",d.miniCssF=e=>{},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},a="qcefviewdoc:",d.l=(e,t,r,f)=>{if(o[e])o[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 a=o[e];if(delete o[e],n.parentNode&&n.parentNode.removeChild(n),a&&a.forEach((e=>e(r))),t)return t(r)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=l.bind(null,n.onerror),n.onload=l.bind(null,n.onload),c&&document.head.appendChild(n)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.p="/QCefView/zh/",d.gca=function(e){return e={17896441:"918",24641798:"548","349b0b02":"32","935f2afb":"53","0bed074d":"54","8d2f2028":"76","8326e4e5":"177",c4f5d8e4:"195",dc1e63a8:"216","67e37d85":"287","34ec668e":"311","4c071278":"340",c697ee9d:"344","1be78505":"514","19278b7e":"591","847def2a":"648","41bff2a2":"742","066979e5":"758","644a6959":"789","546bbbf6":"813",e66b6224:"946","1d2cef8f":"963",d2c62717:"974"}[e]||e,d.p+d.u(e)},(()=>{var e={303:0,532:0};d.f.j=(t,r)=>{var o=d.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var a=new Promise(((r,a)=>o=e[t]=[r,a]));r.push(o[2]=a);var f=d.p+d.u(t),n=new Error;d.l(f,(r=>{if(d.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var a=r&&("load"===r.type?"missing":r.type),f=r&&r.target&&r.target.src;n.message="Loading chunk "+t+" failed.\n("+a+": "+f+")",n.name="ChunkLoadError",n.type=a,n.request=f,o[1](n)}}),"chunk-"+t,t)}},d.O.j=t=>0===e[t];var t=(t,r)=>{var o,a,f=r[0],n=r[1],c=r[2],i=0;if(f.some((t=>0!==e[t]))){for(o in n)d.o(n,o)&&(d.m[o]=n[o]);if(c)var u=c(d)}for(t&&t(r);i CefViewQuery | QCefView - +

CefViewQuery

window.CefViewQuery(query)是另一种从Javascript中向C++中通信的机制,这种方式的通信是异步操作。更多详细介绍请参见API文档。

当从Javascript中调用该方法时,以下Qt signal会被触发:

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

以下内容将展示CefViewQuery的使用方法。

添加Javascript代码

添加如下Javascript代码:

    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);
}

添加HTML代码:

    <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()" />

添加C++代码

添加如下C++代码:

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);
}

运行应用

启动应用,可以看到如下界面:

First Project

点击Web区域的Query按钮,可以看到如下界面:

First Project

- + \ No newline at end of file diff --git a/zh/docs/guide/FirstProject/index.html b/zh/docs/guide/FirstProject/index.html index 7075d402..6b39450f 100644 --- a/zh/docs/guide/FirstProject/index.html +++ b/zh/docs/guide/FirstProject/index.html @@ -4,13 +4,13 @@ 第一个项目 | QCefView - +

第一个项目

使用Qt Creator或者其他支持的IDE创建一个GUI应用

初始化QCefContext实例

使用QCefView的第一步必须初始化一个QCefContext的实例,跟QApplication一样, 在应用程序的生命周期内必须有且仅有一个QCefContext实例

#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();
}

可以看到初始化QCefContext实例的时候需要传入一个QCefConfig。你可以通过QCefConfig设置一些CEF的配置参数,例如可以设置日志级别,调试端口等。更多详细参数请参考API文档QCefConfig

不要试图主动析构QCefContext实列,该实例跟随Application的生命周期存在和销毁,如果提前销毁则会导致CEF内部状态错误。

创建QCefView实例

一旦初始化QCefContext完成,就可以创建QCefView对象了。

  // build the path to the web resource
QDir dir = QCoreApplication::applicationDirPath();
#if defined(OS_MACOS)
QString uri = QString("file://") + QDir::toNativeSeparators(dir.filePath("../Resources/QCefViewTestPage.html"));
#else
QString uri = QString("file://") + QDir::toNativeSeparators(dir.filePath("QCefViewTestPage.html"));
#endif

// 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);

创建一个简单的Web页面

创建一个简单的Web页面,内容如下:

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

运行应用

启动应用,可以看到如下界面:

First Project

- + \ No newline at end of file diff --git a/zh/docs/guide/Interoperability/index.html b/zh/docs/guide/Interoperability/index.html index f3877290..ad0aa5e0 100644 --- a/zh/docs/guide/Interoperability/index.html +++ b/zh/docs/guide/Interoperability/index.html @@ -4,13 +4,13 @@ C++/Javascript互操作 | QCefView - +

C++/Javascript互操作

QCefView提供C++/Javascript互操作的能力,因此开发者可以从C++中调用Javascript代码,反之亦然。

互操作能力是通过在QCefView所创建的所有Browser和Frame中插入桥接对象实现的。桥接对象提供一些方法用于原生代码和Web代码进行通信,更多详细介绍请参考WebAPIs

桥接对象被挂载在window对象上,并且可以通过QCefConfig::setBridgeObjectName来设置桥接对象的名字。默认的对象名为CefViewClient

从Javascript中调用C++

桥接对象提供以下方法来从Javascript中调用C++:

invokeMethod(name, ...args),

当该方法在Javascript中调用后,下面的Qt signal将被触发:

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

⚠ 注意: Javascript方法invokeMethod(name, ...args)异步操作,这意味着该方法的调用会立即返回,无论对应的C++ Qt slot是否已经执行完毕。

现在让我们编写一段代码来演示如何从Javascript中调用C++。

添加Javascript代码

添加如下代码在Web页面的\<script>代码块中:

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

添加如下HTML代码:

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

添加C++代码

然后添加如下C++代码用于处理调用请求:

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 {
}
}

运行应用

启动应用,可以看到如下界面:

First Project

点击Web区域中的按钮,可以看到如下界面:

First Project

从C++中调用Javascript

桥接对象提供如下方法支持从C++中调用Javascript:

开发者可以在Javascript中添加任意多的事件监听器,然后在C++中通过以下方法触发这些事件:

⚠ 注意: 以上三个方法的调用全部都是异步操作。

编写代码。

添加Javascript代码

添加如下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;
}
);
}

添加如下HTML代码:

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

添加C++代码

添加C++代码用于触发事件,这里我们需要给UI增加一个原生的按钮,相关代码不在这里展示。

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);
}
}

运行应用

启动应用,可以看到如下界面:

First Project

点击Native区域的按钮来触发Javascript事件处理器,可以看到如下界面:

First Project

- + \ No newline at end of file diff --git a/zh/docs/guide/LoadWebResource/index.html b/zh/docs/guide/LoadWebResource/index.html index 2a95f0bc..e0911d22 100644 --- a/zh/docs/guide/LoadWebResource/index.html +++ b/zh/docs/guide/LoadWebResource/index.html @@ -4,13 +4,13 @@ 加载WebApp资源 | QCefView - +

加载WebApp资源

QCefView提供4种加载Web资源的方式。

1. 加载在线Web内容

在QCefView的构造函数中直接传递在线Web内容的URL

  // 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. 通过本地文件路径加载

在QCefView的构造函数中直接传递本地Web资源文件的全路径,注意路径必须是以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. 添加本地文件目录到URL的映射

如果你的WebApp资源文件较多,并且在一个本地目录中,你可以通过如下方法添加一个本地文件目录到URL的映射:

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

例如WebApp经过编译后输出到webres目录中,其目录结构如下:

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

可以通过以下方法添加映射:

 // 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
);

映射添加之后,便可以通过URL拼接资源相对路径的方式访问所有资源。

4. 添加本地Zip文件到URL的映射

除了添加本地文件目录到URL的映射,还可以添加本地Zip文件到URL的映射,通过以下方法实现:

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

例如以下结构的Zip文件

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

通过以下代码添加映射:

 // 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
);

使用场景

如果你使用比较流行的前端框架(React,Vue或者其他框架)开发你的WebApp,那么上述方法3和4非常有用,特别是SPA WebApp。这些前端项目编译之后输出的静态资源结构比较复杂,所以可以通过添加映射的方式来加载。

- + \ No newline at end of file diff --git a/zh/docs/guide/index.html b/zh/docs/guide/index.html index 05dd5025..f7e8eb4b 100644 --- a/zh/docs/guide/index.html +++ b/zh/docs/guide/index.html @@ -4,13 +4,13 @@ 指引 | QCefView - +

指引

现在,让我们一步一步地创建一个应用,借此来熟悉QCefView的能力。

该章节所涉及的代码均可以在QCeView项目中找到,请参考:QCefViewTest

- + \ No newline at end of file diff --git a/zh/docs/intros/buiding/index.html b/zh/docs/intros/buiding/index.html index 3f40b3f8..b89763e8 100644 --- a/zh/docs/intros/buiding/index.html +++ b/zh/docs/intros/buiding/index.html @@ -4,13 +4,13 @@ 编译方法 | QCefView - +

编译方法

环境配置

1. CMake

QCefView通过CMake管理项目构建,所以请先安装CMake。最低要求版本为3.19.1,推荐使用最新版本。

2. Qt

QCefView是基于Qt框架的,同时支持Qt 5.x和6.x版本。安装Qt之后请确保设置了QTDIR环境变量,使其指向Qt工具链目录,例如:

Windows平台:

set QTDIR=C:\Qt\6.2.2\msvc2019_64

macOS平台:

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

Linux平台:

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

编译构建

https://github.com/CefView/QCefView检出最新代码,不要忘记初始化submodule。该项目依赖子模块:https://github.com/CefView/CefViewCore

你可以使用以下 git 命令下载仓库代码:

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

生成项目之后也可以在目录.build/windows.x86_64中找到Visual Studio项目文件,使用Visual Studio打开和编译。

macOS

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

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

生成项目之后也可以在目录.build/macos.x86_64中找到Xcode项目文件,使用Xcode打开和编译。

Linux

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

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

Linux平台推荐使用Qt Creator作为IDE。

- + \ No newline at end of file diff --git a/zh/docs/intros/change-cef-ver/index.html b/zh/docs/intros/change-cef-ver/index.html index 972a5c68..4a5d8c33 100644 --- a/zh/docs/intros/change-cef-ver/index.html +++ b/zh/docs/intros/change-cef-ver/index.html @@ -4,13 +4,13 @@ 更换CEF版本 | QCefView - +

更换CEF版本

如果需要使用不同版本的CEF,可以参照以下步骤:

1. 选择CEF版本

可以从CEF Automated Builds网站https://cef-builds.spotifycdn.com/index.html选择需要使用的CEF版本。

2. 修改QCefConfig.cmake文件

修改路径下的CefView/CefViewCore/CefConfig.cmake文件中的CEF版本。

通常,只需要修改第一行中的指令

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

设置 CEF_SDK_VERSION 为要使用的目标版本。

注意!这里的格式为112.3.0+gb09c4ca+chromium-112.0.5615.165,非cef_binary_112.3.0+gb09c4ca+chromium-112.0.5615.165_windows64

3. 构建QCefView

按照上一节的内容构建编译QCefView项目即可。

⚠ WARNING: 如果选择的CEF目标版本较旧,或者较新(引入了破坏性的接口变更等),可能导致编译失败,此种情况则需要自行修改CefViewCore的代码来进行适配。

- + \ No newline at end of file diff --git a/zh/docs/intros/index.html b/zh/docs/intros/index.html index 19b506d8..e05bec60 100644 --- a/zh/docs/intros/index.html +++ b/zh/docs/intros/index.html @@ -4,13 +4,13 @@ 快速开始 | QCefView - +

快速开始

QCefView是什么?

QCefView是为Qt框架开发的一个封装集成了Chromium Embedded Framework库的Wdiget UI组件。使用QCefView可以充分发挥CEF丰富强大的Web能力,快速开发混合架构的应用程序。

  • 使用Qt开发者熟悉的Forms,signal/slot来开发应用
  • 方便直观的Javascript/C++互操作方式

为何选择QCefView而不用Electron?

从设计思路和最终形态来讲QCefView和Electron是完全不同的技术。

  • QCefView只是一个为Qt框架开发的UI组件,Electron则是一个功能完备的应用开发框架
  • QCefView是为Native系统开发者设计的,Electron对前端开发者更友好
  • QCefView使用C++作为主要开发语言,Electron全部基于Javascript
  • QCefView提供便捷直观的Javascript/C++互操作方式,Electron通过编写插件实现Web/Native互操作

QCefView适合开发何种类型的应用?

如果你打算使用Web前端技术来开发你的应用UI,同时保持使用Native方式编写核心业务/功能逻辑,QCefView是最佳选择。

例如:

  • 音乐/视频播放器
  • 游戏平台
  • 工具类应用
  • 等等……

以上场景中的应用几乎都是基于内容的平台,他们都需要展示很多列表,表格或者有各种复杂特效的页面。基于此种目的,Web前端技术是目前的最好的选择,把UI当作Web前端App来开发,而核心的功能和逻辑仍然使用Native的方式来编写,然后通过QCefView整合,能极大的提升生产效率,并且一份UI代码适配所有主流桌面平台。

如果你打算开发一款浏览器,QCefView并不是较好的选择,因为QCefView设计的目的是UI组件,并不提供作为浏览器的全部特性,该类需求应该使用原生CEF来实现较好。

不喜欢Qt,有其他选择么?

如果你不喜欢使用Qt,你可以选择使用原生CEF来构建定制化的browser view组件,例如你可以将CEF与Cocoa框架进行集成,从而创建一个macOS平台原生的WebView,可以参考:CocoaCefView

- + \ No newline at end of file diff --git a/zh/docs/reference/QCefConfig/index.html b/zh/docs/reference/QCefConfig/index.html index 5526079e..1e359774 100644 --- a/zh/docs/reference/QCefConfig/index.html +++ b/zh/docs/reference/QCefConfig/index.html @@ -4,13 +4,13 @@ QCefConfig | QCefView - +

class QCefConfig

表示CEF设置。有关更多详细信息,请参阅: https://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage.md#markdown-header-cefsettings

总结

成员描述
public QCefConfig()QCefConfig 构造函数
public QCefConfig(const QCefConfig & other)QCefConfig 拷贝构造函数
public QCefConfig&operator=(const QCefConfig & other)QCefConfig 拷贝赋值函数
public ~QCefConfig()QCefConfig 析构函数
public void addCommandLineSwitch(const QString & smitch)将参数添加到用于初始化 CEF 的命令行参数
public void addCommandLineSwitchWithValue(const QString & smitch, const QString & v)将带有值的参数添加到用于初始化 CEF 的命令行参数
public void setWindowlessRenderingEnabled(const bool enabled)设置启用/禁用 OSR 模式
public const QVariant WindowlessRenderingEnabled() const获取 OSR 模式标志
public void setBrowserSubProcessPath(const QString & path)设置浏览器子进程路径
public const QString browserSubProcessPath() const获取浏览器子进程路径
public void setResourceDirectoryPath(const QString & path)设置资源目录路径
public const QString resourceDirectoryPath() const获取资源目录路径
public void setLocalesDirectoryPath(const QString & path)设置区域目录路径
public const QString localesDirectoryPath() const获取区域目录路径
public void setLogLevel(const LogLevel lvl)设置日志级别
public const QCefConfig::LogLevel logLevel() const获取日志级别
public void setLocale(const QString & locale)设置区域
public const QString locale() const获取区域
public void setUserAgent(const QString & agent)设置User-Agent
public const QString userAgent() const获取User-Agent
public void setCachePath(const QString & path)设置缓存路径
public const QString cachePath() const获取缓存路径
public void setUserDataPath(const QString & path)设置用户数据目录路径
public const QString userDataPath() const获取用户数据目录路径
public void setBridgeObjectName(const QString & name)设置 Bridge 对象名字
public const QString bridgeObjectName() const获取 Bridge 对象名字
public void setBackgroundColor(const QColor & color)设置网页的背景色
public const QVariant backgroundColor() const获取网页的背景色
public void setAcceptLanguageList(const QString & languages)设置可接受的语言列表
public const QString acceptLanguageList() const获取可接受的语言列表
public void setPersistSessionCookies(bool enabled)设置是否保留会话 Cookie
public const QVariant persistSessionCookies() const获取是否保留会话 Cookie
public void setPersistUserPreferences(bool enabled)设置是否保留用户首选项
public const QVariant persistUserPreferences() const获取是否保留用户首选项
public void setRemoteDebuggingPort(short port)设置远程调试端口
public const QVariant remoteDebuggingPort() const获取远程调试端口
enum LogLevel日志级别枚举
private QScopedPointer< QCefConfigPrivate > d_ptr

Members


public QCefConfig()

QCefConfig 构造函数


public QCefConfig(const QCefConfig & other)

QCefConfig 拷贝构造函数


public QCefConfig&operator=(const QCefConfig & other)

QCefConfig 拷贝赋值函数


public ~QCefConfig()

QCefConfig 析构函数


public void addCommandLineSwitch(const QString & smitch)

将参数添加到用于初始化 CEF 的命令行参数

参数

  • smitch 参数名

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

将带有值的参数添加到用于初始化 CEF 的命令行参数

参数

  • smitch 参数名

  • v 参数值


public void setWindowlessRenderingEnabled(const bool enabled)

设置启用/禁用 OSR 模式

参数

  • enabled True为启用 OSR 模式, false 为禁用

public const QVariant WindowlessRenderingEnabled() const

获取 OSR 模式标志

返回值

OSR 模式的启用/禁用的标志


public void setBrowserSubProcessPath(const QString & path)

设置浏览器子进程路径

参数

  • path 子进程可执行文件的路径

public const QString browserSubProcessPath() const

获取浏览器子进程路径


public void setResourceDirectoryPath(const QString & path)

设置资源目录路径

参数

  • path 资源目录路径

public const QString resourceDirectoryPath() const

获取资源目录路径


public void setLocalesDirectoryPath(const QString & path)

设置区域目录路径

参数

  • path 区域目录路径

public const QString localesDirectoryPath() const

获取区域目录路径


public void setLogLevel(const LogLevel lvl)

设置日志级别

参数

  • lvl

public const QCefConfig::LogLevel logLevel() const

获取日志级别

返回值

当前日志级别


public void setLocale(const QString & locale)

设置区域

参数

  • locale 使用的区域设置。如果为空,将使用默认区域设置“en-US”。在 Linux 上会忽略此值,其中区域设置是使用环境变量解析确定的,优先级顺序为:LANGUAGE、LC_ALL、LC_MESSAGES 和 LANG。也可以使用“lang”命令行开关进行配置。

public const QString locale() const

获取区域


public void setUserAgent(const QString & agent)

设置User-Agent

参数

  • agent User-Agent

public const QString userAgent() const

获取User-Agent


public void setCachePath(const QString & path)

设置缓存路径

参数

  • path 缓存路径

public const QString cachePath() const

获取缓存路径


public void setUserDataPath(const QString & path)

设置用户数据目录路径

参数

  • path 用户数据目录路径

public const QString userDataPath() const

获取用户数据目录路径


public void setBridgeObjectName(const QString & name)

设置 Bridge 对象名字

参数

  • name Bridge 对象名

Bridge 对象表示一个 Javascript 对象,该对象将插入到所有浏览器和框架中。此对象被指定用于在 Web 内容中的 Javascript 和本机上下文 (C/C++) 代码之间进行通信。此对象被设置为窗口对象的属性。这意味着它可以通过在Javascript代码中调用window.bridgeObject来获得。


public const QString bridgeObjectName() const

获取 Bridge 对象名字


public void setBackgroundColor(const QColor & color)

设置网页的背景色

参数

  • color 设置的颜色

这仅在网页未设置背景颜色时才有效。alpha 分量值将调整为 0 或 255,这意味着如果您传递的 alpha 值在 [1, 255] 范围内,它将被接受为 255。默认值为 qRgba(255, 255,255, 255)


public const QVariant backgroundColor() const

获取网页的背景色


public void setAcceptLanguageList(const QString & languages)

设置可接受的语言列表

参数

  • languages 语言列表(逗号分隔)

public const QString acceptLanguageList() const

获取可接受的语言列表


public void setPersistSessionCookies(bool enabled)

设置是否保留会话 Cookie

参数

  • enabled True为保留会话 Cookie

public const QVariant persistSessionCookies() const

获取是否保留会话 Cookie


public void setPersistUserPreferences(bool enabled)

设置是否保留用户首选项

参数

  • enabled True 为保留用户首选项

public const QVariant persistUserPreferences() const

获取是否保留用户首选项


public void setRemoteDebuggingPort(short port)

设置远程调试端口

参数:

  • port 使用的端口

CEF 支持在 Chrome/Edge 中使用 Dev Tools 进行远程调试。如果设置了这个值,那么你可以通过访问http://127.0.0.1:port 从 Chrome/Edge 来调试 web 应用程序


public const QVariant remoteDebuggingPort() const

获取远程调试端口


enum LogLevel

日志级别

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/zh/docs/reference/QCefContext/index.html b/zh/docs/reference/QCefContext/index.html index 73c51f66..8b684693 100644 --- a/zh/docs/reference/QCefContext/index.html +++ b/zh/docs/reference/QCefContext/index.html @@ -4,13 +4,13 @@ QCefContext | QCefView - +
-

class QCefContext

class QCefContext
: public QObject

表示 CEF 上下文

总结

成员描述
public QCefContext(QCoreApplication * app, int argc, char ** argv, const QCefConfig * config)QCefContext 构造函数
public ~QCefContext()QCefContext 析构函数
public void addLocalFolderResource(const QString & path, const QString & url, int priority)添加具有本地 Web 资源目录的 url 映射项。这适用于随后创建的所有实例
public void addArchiveResource(const QString & path, const QString & url, const QString & password, int priority)使用包含 Web 资源的本地存档 (.zip) 文件添加 url 映射项。这适用于随后创建的所有实例
public bool addCookie(const QString & name, const QString & value, const QString & domain, const QString & url)将 Cookie 添加到 CEF 上下文,可从使用此上下文创建的所有浏览器访问此 Cookie
public bool deleteAllCookies()从 CEF 上下文中删除所有 cookie
public bool addCrossOriginWhitelistEntry(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)将条目添加到跨域访问白名单中
public bool removeCrossOriginWhitelistEntry(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)从跨域访问白名单中删除一个条目
public bool clearCrossOriginWhitelistEntry()从跨域访问白名单中删除所有条目
public const QCefConfig*cefConfig() const获取 QCefConfig
protected bool init(const QCefConfig * config)初始化 CEF 上下文
protected void uninit()取消初始化 CEF 上下文
private QScopedPointer< QCefContextPrivate > d_ptr
public static QCefContext*instance()获取唯一的默认实例

Members


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

QCefContext 构造函数

参数

  • app QCoreApplication 实例

  • argc main() 参数 argc

  • argv main() 参数 argv

  • config QCefConfig 实例


public ~QCefContext()

QCefContext 析构函数


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

添加具有本地 Web 资源目录的 url 映射项。这适用于随后创建的所有实例

参数

  • path 本地资源目录的路径

  • url 要映射到的网址

  • priority 优先级


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

使用包含 Web 资源的本地存档 (.zip) 文件添加 url 映射项。这适用于随后创建的所有实例

参数

  • path 本地存档文件的路径

  • url 要映射到的网址

  • password 存档的密码

  • priority 优先级


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

将 Cookie 添加到 CEF 上下文,可从使用此上下文创建的所有浏览器访问此 Cookie

参数

  • name cookie 项名称

  • value cookie 项值

  • domain 适用的域名

  • url 适用的网址

返回值

True 为成功; 其他为 false


public bool deleteAllCookies()

从 CEF 上下文中删除所有 cookie


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

将条目添加到跨域访问白名单

参数

  • sourceOrigin
  • targetSchema
  • targetDomain
  • allowTargetSubdomains

返回值

True 为成功; 其他为 false


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

从跨域访问白名单中删除一个条目

参数

  • sourceOrigin
  • targetSchema
  • targetDomain
  • allowTargetSubdomains

返回值

True 为成功; 其他为 false


public bool clearCrossOriginWhitelistEntry()

从跨域访问白名单中删除所有条目


public const QCefConfig*cefConfig() const

获取 QCefConfig

返回值

QCefConfig 实例


protected bool init(const QCefConfig * config)

初始化 CEF 上下文

参数

返回值

True 为成功; 其他为 false


protected void uninit()

取消初始化 CEF 上下文


private QScopedPointer< QCefContextPrivate > d_ptr


public static QCefContext*instance()

获取唯一的默认实例

返回值

默认实例

- +

class QCefContext

class QCefContext
: public QObject

表示 CEF 上下文

总结

成员描述
public QCefContext(QCoreApplication * app, int argc, char ** argv, const QCefConfig * config)QCefContext 构造函数
public ~QCefContext()QCefContext 析构函数
public void addLocalFolderResource(const QString & path, const QString & url, int priority)添加具有本地 Web 资源目录的 url 映射项。这适用于随后创建的所有实例
public void addArchiveResource(const QString & path, const QString & url, const QString & password, int priority)使用包含 Web 资源的本地存档 (.zip) 文件添加 url 映射项。这适用于随后创建的所有实例
public bool addCookie(const QString & name, const QString & value, const QString & domain, const QString & url)将 Cookie 添加到 CEF 上下文,可从使用此上下文创建的所有浏览器访问此 Cookie
public bool deleteAllCookies()从 CEF 上下文中删除所有 cookie
public bool addCrossOriginWhitelistEntry(const QString & sourceOrigin, const QString & targetSchema, const QString & targetDomain, bool allowTargetSubdomains)将条目添加到跨域访问白名单中。详情请参阅: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)从跨域访问白名单中删除一个条目。详情请参阅:https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L91C12-L91C12
public bool clearCrossOriginWhitelistEntry()从跨域访问白名单中删除所有条目
public const QCefConfig*cefConfig() const获取 QCefConfig
protected bool init(const QCefConfig * config)初始化 CEF 上下文
protected void uninit()取消初始化 CEF 上下文
private QScopedPointer< QCefContextPrivate > d_ptr
public static QCefContext*instance()获取唯一的默认实例

Members


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

QCefContext 构造函数

参数

  • app QCoreApplication 实例

  • argc main() 参数 argc

  • argv main() 参数 argv

  • config QCefConfig 实例


public ~QCefContext()

QCefContext 析构函数


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

添加具有本地 Web 资源目录的 url 映射项。这适用于随后创建的所有实例

参数

  • path 本地资源目录的路径

  • url 要映射到的网址

  • priority 优先级


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

使用包含 Web 资源的本地存档 (.zip) 文件添加 url 映射项。这适用于随后创建的所有实例

参数

  • path 本地存档文件的路径

  • url 要映射到的网址

  • password 存档的密码

  • priority 优先级


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

将 Cookie 添加到 CEF 上下文,可从使用此上下文创建的所有浏览器访问此 Cookie

参数

  • name cookie 项名称

  • value cookie 项值

  • domain 适用的域名

  • url 适用的网址

返回值

True 为成功; 其他为 false


public bool deleteAllCookies()

从 CEF 上下文中删除所有 cookie


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

将条目添加到跨域访问白名单。详情请参阅:https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L81C23-L81C23

参数

  • sourceOrigin 源头
  • targetSchema 目标模式
  • targetDomain 目标域
  • allowTargetSubdomains 是否允许子域

返回值

True 为成功; 其他为 false


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

从跨域访问白名单中删除一个条目。详情请参阅:https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L91C12-L91C12

参数

  • sourceOrigin 源头
  • targetSchema 目标模式
  • targetDomain 目标域
  • allowTargetSubdomains 是否允许子域

返回值

True 为成功; 其他为 false


public bool clearCrossOriginWhitelistEntry()

从跨域访问白名单中删除所有条目


public const QCefConfig*cefConfig() const

获取 QCefConfig

返回值

QCefConfig 实例


protected bool init(const QCefConfig * config)

初始化 CEF 上下文

参数

返回值

True 为成功; 其他为 false


protected void uninit()

取消初始化 CEF 上下文


private QScopedPointer< QCefContextPrivate > d_ptr


public static QCefContext*instance()

获取唯一的默认实例

返回值

默认实例

+ \ No newline at end of file diff --git a/zh/docs/reference/QCefDownloadItem/index.html b/zh/docs/reference/QCefDownloadItem/index.html index df0ba190..73b9611e 100644 --- a/zh/docs/reference/QCefDownloadItem/index.html +++ b/zh/docs/reference/QCefDownloadItem/index.html @@ -4,13 +4,13 @@ QCefDownloadItem | QCefView - +

class QCefDownloadItem

表示下载项

总结

成员描述
public ~QCefDownloadItem()QCefDownloadItem 析构函数
public void start(const QString & path, bool useDefaultDialog) const开始下载
public void pause() const暂停下载
public void resume() const恢复下载
public void cancel() const取消下载
public bool isStarted() const获取下载是否已开始
public bool isInProgress() const获取下载是否正在进行
public bool isComplete() const获取下载是否完成
public bool isCanceled() const获取下载是否已取消或中断
public qint64 currentSpeed() const获取当前下载速度
public int percentComplete() const获取完成百分比
public qint64 totalBytes() const获取总字节数
public qint64 receivedBytes() const获取接收的字节数
public QDateTime startTime() const获取下载开始的时间
public QDateTime endTime() const获取下载结束的时间
public QString fullPath() const获取已下载或正在下载文件的完整路径
public quint32 id() const获取此下载的唯一标识符
public QString url() const获取网址
public QString originalUrl() const在任何重定向之前获取原始 URL
public QString suggestedFileName() const获取建议的文件名
public QString contentDisposition() const获取内容配置
public QString mimeType() const获取 MIME 类型
private QScopedPointer< QCefDownloadItemPrivate > d_ptr
private QCefDownloadItem(QCefDownloadItem &&) = delete
private QCefDownloadItem&operator=(QCefDownloadItem &&) = delete
private QCefDownloadItem()QCefDownloadItem 构造函数

Members


public ~QCefDownloadItem()

QCefDownloadItem 析构函数


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

开始下载

参数

  • path 保存下载项的完整路径名(必须包括文件名)
  • useDefaultDialog 是否使用默认的“另存为...”对话框

仅当 useDefaultDialog 设置为 false 时,path 参数才有效。如果将 useDefaultDialog 设置为 true,则无法控制打开的"另存为..."对话框的初始位置,它由 CEF 内部实现决定。


public void pause() const

暂停下载


public void resume() const

恢复下载


public void cancel() const

取消下载


public bool isStarted() const

获取下载是否已开始

返回值


public bool isInProgress() const

获取下载是否正在进行

返回值

如果下载正在进行为 true;否则为false


public bool isComplete() const

获取下载是否完成

返回值

如果下载完成为 true;否则为false


public bool isCanceled() const

获取下载是否已取消或中断

返回值

如果下载已被取消或中断为 true;否则为 false


public qint64 currentSpeed() const

获取当前下载速度

返回值

以 bytes/s 为单位的简单速度估算


public int percentComplete() const

获取完成百分比

返回值

粗略完成百分比或 -1(如果接收总大小未知)


public qint64 totalBytes() const

获取总字节数

返回值

总字节数


public qint64 receivedBytes() const

获取接收的字节数

返回值

接收的字节数


public QDateTime startTime() const

获取下载开始的时间

返回值

下载开始的时间


public QDateTime endTime() const

获取下载结束的时间

返回值

下载结束的时间


public QString fullPath() const

获取已下载或正在下载文件的完整路径

返回值

已下载或正在下载文件的完整路径


public quint32 id() const

获取此下载的唯一标识符

返回值

此下载的唯一标识符


public QString url() const

获取网址

返回值

网址


public QString originalUrl() const

获取在任何重定向之前原始 URL

返回值

在任何重定向之前原始 URL


public QString suggestedFileName() const

获取建议的文件名

返回值

建议的文件名


public QString contentDisposition() const

获取内容配置

返回值

内容配置


public QString mimeType() const

获取 MIME 类型

返回值

MIME 类型


private QScopedPointer< QCefDownloadItemPrivate > d_ptr


private QCefDownloadItem(QCefDownloadItem &&) = delete


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


private QCefDownloadItem()

QCefDownloadItem 构造函数

- + \ No newline at end of file diff --git a/zh/docs/reference/QCefEvent/index.html b/zh/docs/reference/QCefEvent/index.html index 34cd3e52..a494c0c3 100644 --- a/zh/docs/reference/QCefEvent/index.html +++ b/zh/docs/reference/QCefEvent/index.html @@ -4,13 +4,13 @@ QCefEvent | QCefView - +

class QCefEvent

表示从本机上下文(C/C++ 代码)发送到 Web 上下文(javascript)的事件

总结

成员描述
public QCefEvent()QCefEvent 构造函数
public QCefEvent(const QString & name)QCefEvent 有参构造函数
public QCefEvent(const QCefEvent & other)QCefEvent 拷贝构造函数
public QCefEvent&operator=(const QCefEvent & other)QCefEvent 拷贝赋值函数
public ~QCefEvent()QCefEvent 析构函数
public void setEventName(const QString & name)设置事件名称
public const QString eventName() const获取事件名称
public void setArguments(const QVariantList & args)设置参数列表
public QVariantList & arguments()获取参数列表
private QScopedPointer< QCefEventPrivate > d_ptr

Members


public QCefEvent()

QCefEvent 构造函数


public QCefEvent(const QString & name)

QCefEvent 有参构造函数

参数

  • name 事件名称

public QCefEvent(const QCefEvent & other)

QCefEvent 拷贝构造函数

参数

  • other 另一个 QCefEvent 实例

public QCefEvent&operator=(const QCefEvent & other)

QCefEvent 拷贝赋值函数

参数

  • other 另一个 QCefEvent 实例

public ~QCefEvent()

QCefEvent 析构函数


public void setEventName(const QString & name)

设置事件名称

参数

  • name 要设置的名称

public const QString eventName() const

获取事件名称

返回值

事件名称


public void setArguments(const QVariantList & args)

设置参数列表

参数

  • args 参数列表

public QVariantList & arguments()

获取参数列表

返回值

参数列表


private QScopedPointer< QCefEventPrivate > d_ptr

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

class QCefQuery

表示从 Web 内容(Javascript)发送的查询请求

总结

成员描述
public QCefQuery()QCefQuery 构造函数
public QCefQuery(const QString & req, const int64_t query)QCefQuery 有参构造函数
public QCefQuery(const QCefQuery & other)QCefQuery 拷贝构造函数
public QCefQuery&operator=(const QCefQuery & other)QCefQuery 拷贝赋值函数
public ~QCefQuery()QCefQuery 析构函数
public const QString request() const获取查询内容
public const qint64 id() const获取查询 ID
public const QString response() const获取响应内容字符串
public const bool result() const获取响应结果
public const int error() const获取响应错误
public void setResponseResult`(bool success, const QString & response, int error) const设置响应
private QScopedPointer< QCefQueryPrivate > d_ptr

Members


public QCefQuery()

QCefQuery 构造函数


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

QCefQuery 有参构造函数

参数

  • req 请求上下文

  • query 查询 ID


public QCefQuery(const QCefQuery & other)

QCefQuery 拷贝构造函数

参数

  • other 另一个 QCefQuery 实例

public QCefQuery&operator=(const QCefQuery & other)

QCefQuery 拷贝赋值函数

参数

  • other 另一个 QCefQuery 实例

public ~QCefQuery()

QCefQuery 析构函数


public const QString request() const

获取查询内容

返回值

查询内容


public const qint64 id() const

获取查询 ID

返回值

查询 ID


public const QString response() const

获取响应内容字符串

返回值

响应内容字符串


public const bool result() const

获取响应结果

返回值

响应结果


public const int error() const

获取响应错误

返回值

响应错误


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

设置响应

参数

  • success 如果查询成功,为 true;否则为 false

  • response 响应内容字符串

  • error 响应错误


private QScopedPointer< QCefQueryPrivate > d_ptr

- + \ No newline at end of file diff --git a/zh/docs/reference/QCefSetting/index.html b/zh/docs/reference/QCefSetting/index.html index 8a0f5c71..f95d7d65 100644 --- a/zh/docs/reference/QCefSetting/index.html +++ b/zh/docs/reference/QCefSetting/index.html @@ -4,13 +4,13 @@ QCefSetting | QCefView - +

class QCefSetting

表示单个浏览器的设置

总结

成员描述
public QCefSetting()QCefSetting 构造函数
public QCefSetting(const QCefSetting & other)QCefSetting 拷贝构造函数
public QCefSetting&operator=(const QCefSetting & other)QCefSetting 拷贝赋值函数
public ~QCefSetting()QCefSetting 析构函数
public void setStandardFontFamily(const QString value)设置标准字体族
public const QString standardFontFamily() const获取标准字体族
public void setFixedFontFamily(const QString & value)设置等宽字体族
public const QString fixedFontFamily() const获取等宽字体族
public void setSerifFontFamily(const QString & value)设置衬线字体族
public const QString serifFontFamily() const获取衬线字体族
public void setSansSerifFontFamily(const QString & value)设置无衬线字体族
public const QString sansSerifFontFamily() const获取无衬线字体族
public void setCursiveFontFamily(const QString & value)设置手写字体族
public const QString cursiveFontFamily() const获取手写字体族
public void setFantasyFontFamily(const QString & value)设置艺术字体族
public const QString fantasyFontFamily() const获取艺术字体族
public void setDefaultEncoding(const QString & value)设置默认编码
public const QString defaultEncoding() const获取默认编码
public void setAcceptLanguageList(const QString & value)设置可接受的语言列表
public const QString acceptLanguageList() const获取可接受的语言列表
public void setWindowlessFrameRate(const int value)设置 OSR 模式的帧率
public const QVariant windowlessFrameRate() const获取 OSR 模式的帧率
public void setDefaultFontSize(const int value)设置默认字体大小
public const QVariant defaultFontSize() const获取默认字体大小
public void setDefaultFixedFontSize(const int value)设置默认等宽字体大小
public const QVariant defaultFixedFontSize() const获取默认等宽字体大小
public void setMinimumFontSize(const int value)设置最小字体大小
public const QVariant minimumFontSize() const获取最小字体大小
public void setMinimumLogicalFontSize(const int value)设置最小逻辑字体大小
public const QVariant minimumLogicalFontSize() const获取最小逻辑字体大小
public void setRemoteFonts(const bool value)设置为启用或禁用远程字体
public const QVariant remoteFonts() const获取是启用还是禁用远程字体
public void setJavascript(const bool value)设置为启用或禁用 Javascript
public const QVariant javascript() const获取是启用还是禁用 Javascript
public void setJavascriptCloseWindows(const bool value)设置启用或禁用从 Javascript 关闭窗口的权限
public const QVariant javascriptCloseWindows() const获取是否启用或禁用从 Javascript 关闭窗口的权限
public void setJavascriptAccessClipboard(const bool value)设置为启用或禁用从 Javascript 访问剪贴板的权限
public const QVariant javascriptAccessClipboard() const获取是否启用或禁用从 Javascript 访问剪贴板的权限
public void setJavascriptDomPaste(const bool value)设置启用或禁用在 Javascript 中粘贴 DOM 的权限
public const QVariant javascriptDomPaste() const获取是否启用或禁用在 JavaScript 中粘贴 DOM 的权限
public void setPlugins(const bool value)设置为启用或禁用插件
public const QVariant plugins() const获取是启用还是禁用插件
public void setImageLoading(const bool value)获取是启用还是禁用加载图像的权限
public const QVariant imageLoading() const获取是启用还是禁用加载图像的权限
public void setImageShrinkStandaloneToFit(const bool value)设置为启用或禁用独立缩小图像以适应
public const QVariant imageShrinkStandaloneToFit() const获取启用或禁用独立缩小图像以适应
public void setTextAreaResize(const bool value)设置为启用或禁用文本区域的大小调整
public const QVariant textAreaResize() const获取是启用还是禁用调整文本区域的大小
public void setTabToLinks(const bool value)设置为启用或禁用选项卡到链接
public const QVariant tabToLinks() const获取是启用还是禁用指向链接的选项卡
public void setLocalStorage(const bool value)设置为启用或禁用本地存储
public const QVariant localStorage() const获取是启用还是禁用本地存储
public void setDatabases(const bool value)设置为启用或禁用数据库
public const QVariant databases() const获取是启用还是禁用数据库
public void setWebGL(const bool value)设置为启用或禁用 webGL
public const QVariant webGL() const获取是启用还是禁用 webGL
public void setBackgroundColor(const QColor & value)设置背景颜色
public const QVariant backgroundColor() const获取背景色
private QScopedPointer< QCefSettingPrivate > d_ptr

Members


public QCefSetting()

QCefSetting 构造函数


public QCefSetting(const QCefSetting & other)

QCefSetting 拷贝构造函数

参数


public QCefSetting&operator=(const QCefSetting & other)

QCefSetting 拷贝赋值函数

参数


public ~QCefSetting()

QCefSetting 析构函数


public void setStandardFontFamily(const QString value)

设置标准字体族

参数

  • value 字体族

public const QString standardFontFamily() const

获取标准字体族

返回值

字体族


public void setFixedFontFamily(const QString & value)

设置等宽字体族

参数

  • value 字体族

public const QString fixedFontFamily() const

获取等宽字体族

返回值

字体族


public void setSerifFontFamily(const QString & value)

设置衬线字体族

参数

  • value 字体族

public const QString serifFontFamily() const

获取衬线字体族

返回值

字体族


public void setSansSerifFontFamily(const QString & value)

设置无衬线字体族

参数

  • value 字体族

public const QString sansSerifFontFamily() const

获取无衬线字体族

返回值

字体族


public void setCursiveFontFamily(const QString & value)

设置手写字体族

参数

  • value 字体族

public const QString cursiveFontFamily() const

获取手写字体族

返回值

字体族


public void setFantasyFontFamily(const QString & value)

设置艺术字体族

参数

  • value 字体族

public const QString fantasyFontFamily() const

获取艺术字体族

返回值

字体族


public void setDefaultEncoding(const QString & value)

设置默认编码

参数

  • value 编码名称

public const QString defaultEncoding() const

获取默认编码

返回值

编码名称


public void setAcceptLanguageList(const QString & value)

设置可接受的语言列表

参数

  • value 可接受的语言列表

public const QString acceptLanguageList() const

获取可接受的语言列表

返回值

可接受的语言列表


public void setWindowlessFrameRate(const int value)

设置 OSR 模式的帧率

参数

  • value 帧率

public const QVariant windowlessFrameRate() const

获取 OSR 模式的帧率

返回值

帧率


public void setDefaultFontSize(const int value)

设置默认字体大小

参数

  • value 字体大小

public const QVariant defaultFontSize() const

获取默认字体大小

返回值

字体大小


public void setDefaultFixedFontSize(const int value)

设置默认等宽字体大小

参数

  • value 字体大小

public const QVariant defaultFixedFontSize() const

获取默认等宽字体大小

返回值

字体大小


public void setMinimumFontSize(const int value)

设置最小字体大小

参数

  • value 字体大小

public const QVariant minimumFontSize() const

获取最小字体大小

返回值

字体大小


public void setMinimumLogicalFontSize(const int value)

设置最小逻辑字体大小

参数

  • value 字体大小

public const QVariant minimumLogicalFontSize() const

获取最小逻辑字体大小

返回值

字体大小


public void setRemoteFonts(const bool value)

设置为启用或禁用远程字体

参数

  • value True 为启用; false为禁用

public const QVariant remoteFonts() const

获取是启用还是禁用远程字体

返回值

True 为启用; false为禁用


public void setJavascript(const bool value)

设置为启用或禁用 Javascript

参数

  • value True 为启用; false为禁用

public const QVariant javascript() const

获取是启用还是禁用 Javascript

返回值

True 为启用; false为禁用


public void setJavascriptCloseWindows(const bool value)

设置启用或禁用从 Javascript 关闭窗口的权限

参数

  • value True 为启用; false为禁用

public const QVariant javascriptCloseWindows() const

获取是否启用或禁用从 Javascript 关闭窗口的权限

返回值

True 为启用; false为禁用


public void setJavascriptAccessClipboard(const bool value)

设置为启用或禁用从 Javascript 访问剪贴板的权限

参数

  • value True 为启用; false为禁用

public const QVariant javascriptAccessClipboard() const

获取是否启用或禁用从 Javascript 访问剪贴板的权限

返回值

True 为启用; false为禁用


public void setJavascriptDomPaste(const bool value)

设置启用或禁用在 Javascript 中粘贴 DOM 的权限

参数

  • value True 为启用; false为禁用

public const QVariant javascriptDomPaste() const

获取是否启用或禁用在 JavaScript 中粘贴 DOM 的权限

返回值

True 为启用; false为禁用


public void setPlugins(const bool value)

设置为启用或禁用插件

参数

  • value True 为启用; false为禁用

public const QVariant plugins() const

获取启用还是禁用插件

返回值

True 为启用; false为禁用


public void setImageLoading(const bool value)

设置启用还是禁用加载图像的权限

参数

  • value True 为启用; false为禁用

public const QVariant imageLoading() const

获取启用还是禁用加载图像的权限

返回值

True 为启用; false为禁用


public void setImageShrinkStandaloneToFit(const bool value)

设置为启用或禁用独立缩小图像以适应

参数

  • value True 为启用; false为禁用

public const QVariant imageShrinkStandaloneToFit() const

获取启用或禁用独立缩小图像以适应

返回值

True 为启用; false为禁用


public void setTextAreaResize(const bool value)

设置为启用或禁用文本区域的大小调整

参数

  • value True 为启用; false为禁用

public const QVariant textAreaResize() const

获取是启用还是禁用调整文本区域的大小

返回值

True 为启用; false为禁用


public void setTabToLinks(const bool value)

设置为启用或禁用选项卡到链接

参数

  • value True 为启用; false为禁用

public const QVariant tabToLinks() const

获取启用还是禁用指向链接的选项卡

返回值

True 为启用; false为禁用


public void setLocalStorage(const bool value)

设置为启用或禁用本地存储

参数

  • value True 为启用; false为禁用

public const QVariant localStorage() const

获取启用还是禁用本地存储

返回值

True 为启用; false为禁用


public void setDatabases(const bool value)

设置为启用或禁用数据库

参数

  • value True 为启用; false为禁用

public const QVariant databases() const

获取是启用还是禁用数据库

返回值

True 为启用; false为禁用


public void setWebGL(const bool value)

设置为启用或禁用 webGL

参数

  • value True 为启用; false为禁用

public const QVariant webGL() const

获取启用还是禁用 webGLL

返回值

True 为启用; false为禁用


public void setBackgroundColor(const QColor & value)

设置背景颜色

参数

  • value 颜色值

这仅在网页未设置背景颜色时才有效。alpha 分量值将调整为 0 或 255,这意味着如果您传递的 alpha 值在 [1, 255] 范围内,它将被接受为 255。默认值继承自 QCefConfig::backgroundColor()


public const QVariant backgroundColor() const

获取背景色

返回值

颜色值


private QScopedPointer< QCefSettingPrivate > d_ptr

- + \ No newline at end of file diff --git a/zh/docs/reference/QCefView/index.html b/zh/docs/reference/QCefView/index.html index 743548a6..e7b93560 100644 --- a/zh/docs/reference/QCefView/index.html +++ b/zh/docs/reference/QCefView/index.html @@ -4,13 +4,13 @@ QCefView | QCefView - +
-

class QCefView

class QCefView
: public QWidget

表示 CEF 浏览器视图

总结

成员描述
public QCefView(const QString url, const QCefSetting * setting, QWidget * parent, Qt::WindowFlags f)QCefView 有参构造函数
public QCefView(QWidget * parent, Qt::WindowFlags f)QCefView 有参构造函数
public ~QCefView()QCefView 析构函数
public void addLocalFolderResource(const QString & path, const QString & url, int priority)添加具有本地 Web 资源目录的 url 映射项
public void addArchiveResource(const QString & path, const QString & url, const QString & password, int priority)使用包含 Web 资源的本地存档 (.zip) 文件添加 url 映射项
public int browserId()获取浏览器 ID
public bool isPopup()获取浏览器是否创建为弹出式浏览器
public void navigateToString(const QString & content)导航到内容
public void navigateToUrl(const QString & url)导航到网址
public bool browserCanGoBack()检查浏览器是否可以返回
public bool browserCanGoForward()检查浏览器是否可以前进
public void browserGoBack()要求浏览器返回
public void browserGoForward()要求浏览器前进
public bool browserIsLoading()检查浏览器是否正在加载
public void browserReload()要求浏览器重新加载
public void browserStopLoad()要求浏览器停止加载
public bool triggerEvent(const QCefEvent & event)触发主框架的事件
public bool triggerEvent(const QCefEvent & event, qint64 frameId)触发指定frame的事件
public bool broadcastEvent(const QCefEvent & event)为所有frame广播事件
public bool responseQCefQuery(const QCefQuery & query)响应 QCefQuery 请求
public bool executeJavascript(qint64 frameId, const QString & code, const QString & url)在指定的frame中执行javascript代码,此方法不报告javascript的结果。要获取 javascript 执行的结果,请使用executeJavascriptWithResult
public bool executeJavascriptWithResult(qint64 frameId, const QString & code, const QString & url, qint64 context)在指定的frame中执行javascript代码,结果将通过reportJavascriptResult 信号发送
public bool setPreference(const QString & name, const QVariant & value, const QString & error)设置此浏览器的首选项
public void setDisablePopupContextMenu(bool disable)设置是否禁用弹出浏览器的上下文菜单
public bool isPopupContextMenuDisabled()获取是否禁用弹出浏览器的上下文菜单
public bool hasDevTools()检测此浏览器是否打开了devtools
public void showDevTools()打开 devtools 对话框
public void closeDevTools()关闭 devtools 对话框
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)请参考 QWidget::setFocus
public QVariant inputMethodQuery(Qt::InputMethodQuery query) const请参考QWidget::inputMethodQuery
protected virtual bool onBeforePopup(qint64 frameId, const QString & targetUrl, const QString & targetFrameName, QCefView::CefWindowOpenDispositiontargetDisposition, QRect & rect,QCefSetting & settings)在创建弹出式浏览器之前被调用
protected virtual void onNewDownloadItem(const QSharedPointer< QCefDownloadItem > & item, const QString & suggestedName)需要对新下载项的调用。保留对下载项的引用并调用 QCefDownloadItem::start 方法以允许并启动下载,忽略下载项以禁止下载
protected virtual void onUpdateDownloadItem(const QSharedPointer< QCefDownloadItem > & item)在更新下载项时调用。 若要获取QCefDownloadItem::start的方法,必须在 newDownloadItem 方法中调用
protected void paintEvent(QPaintEvent * event)请参考 QWidget::paintEvent
protected void inputMethodEvent(QInputMethodEvent * event)请参考 QWidget::inputMethodEvent
protected void showEvent(QShowEvent * event)请参考 QWidget::showEvent
protected void hideEvent(QHideEvent * event)请参考 QWidget::hideEvent
protected void focusInEvent(QFocusEvent * event)请参考 QWidget::focusInEvent
protected void focusOutEvent(QFocusEvent * event)请参考 QWidget::focusOutEvent
protected void resizeEvent(QResizeEvent * event)请参考 QWidget::resizeEvent
protected void keyPressEvent(QKeyEvent * event)请参考 QWidget::keyPressEvent
protected void keyReleaseEvent(QKeyEvent * event)请参考 QWidget::keyReleaseEvent
protected void mouseMoveEvent(QMouseEvent * event)请参考 QWidget::mouseMoveEvent
protected void mousePressEvent(QMouseEvent * event)请参考 QWidget::mousePressEvent
protected void mouseReleaseEvent(QMouseEvent * event)请参考 QWidget::mouseReleaseEvent
protected void wheelEvent(QWheelEvent * event)请参考 QWidget::wheelEvent
protected void contextMenuEvent(QContextMenuEvent * event)请参考 QWidget::contextMenuEvent
{signal} public void loadingStateChanged(int browserId, bool isLoading, bool canGoBack, bool canGoForward)加载状态更改时调用
{signal} public void loadStart(int browserId, qint64 frameId, bool isMainFrame, int transition_type)在加载开始时被调用
{signal} public void loadEnd(int browserId, qint64 frameId, bool isMainFrame, int httpStatusCode)在加载结束时被调用
{signal} public void loadError(int browserId, qint64 frameId, bool isMainFrame, int errorCode, const QString & errorMsg, const QString & failedUrl)由于错误导致加载失败时被调用
{signal} public void draggableRegionChanged(const QRegion & draggableRegion, const QRegion & nonDraggableRegion)在可拖动区域更改时调用
{signal} public void addressChanged(qint64 frameId, const QString & url)在网址更改时被调用
{signal} public void titleChanged(const QString & title)网站标题更改时被调用
{signal} public void faviconURLChanged(const QStringList & urls)网站图标地址更改时被调用
{signal} public void faviconChanged(const QIcon & icon)网站图标更改时被调用
{signal} public void fullscreenModeChanged(bool fullscreen)在全屏模式更改时被调用
{signal} public void statusMessage(const QString & message)状态消息更改时被调用
{signal} public void consoleMessage(const QString & message, int level)从 Web 内容调用控制台消息
{signal} public void loadingProgressChanged(double progress)加载进度更改时调用
{signal} public void cefQueryRequest(int browserId, qint64 frameId, const QCefQuery & query)在新的 QCefQuery 请求上被调用
{signal} public void invokeMethod(int browserId, qint64 frameId, const QString & method, const QVariantList & arguments)在从 Web 内容调用方法请求时调用(Javascript)
{signal} public void reportJavascriptResult(int browserId, qint64 frameId, qint64 context, const QVariant & result)对使用 executeJavascriptWithResult 执行的 javascript 的结果进行调用
{signal} public void nativeBrowserCreated(QWindow * window)在创建原生浏览器窗口后调用。不适用于 OSR 模式。
{signal} public void popupCreated(QCefView * popup)在创建弹出式浏览器后立即调用
{slot} public inline void setFocus()请参考QWidget::setFocus
enum CefWindowOpenDisposition表示 CEF 弹出窗口的打开配置
private QScopedPointer< QCefViewPrivate > d_ptr

Members


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

QCefView 有参构造函数

参数

  • url 目标网址

  • setting QCefSetting 实例

  • parent 父对象


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

QCefView 有参构造函数

参数

  • parent 父对象

public ~QCefView()

QCefView 析构函数


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

添加具有本地 Web 资源目录的 url 映射项

参数

  • path 本地资源目录的路径

  • url 要映射到的网址

  • priority 优先级


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

使用包含 Web 资源的本地存档 (.zip) 文件添加 url 映射项

参数

  • path 本地存档文件的路径

  • url 要映射到的网址

  • password 存档的密码

  • priority 优先级


public int browserId()

获取浏览器 ID

返回值

浏览器 ID 标识


public bool isPopup()

获取浏览器是否创建为弹出式浏览器

返回值

如果是弹出式浏览器,则为 true;否则为false


public void navigateToString(const QString & content)

导航到内容

参数

  • content 内容

public void navigateToUrl(const QString & url)

导航到网址

参数

  • url 网址

public bool browserCanGoBack()

检查浏览器是否可以返回

返回值

如果可以,则为true;否则为false


public bool browserCanGoForward()

检查浏览器是否可以前进

返回值

如果可以,则为true;否则为false


public void browserGoBack()

要求浏览器返回


public void browserGoForward()

要求浏览器前进


public bool browserIsLoading()

检查浏览器是否正在加载

返回值

如果正在加载,则为 true;否则为false


public void browserReload()

要求浏览器重新加载


public void browserStopLoad()

要求浏览器停止加载


public bool triggerEvent(const QCefEvent & event)

触发主框架的事件

参数

返回值

成功时为true;否则为false


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

触发指定frame的事件

参数

返回值

成功时为true;否则为false


public bool broadcastEvent(const QCefEvent & event)

为所有frame广播事件

参数

返回值

成功时为true;否则为false


public bool responseQCefQuery(const QCefQuery & query)

响应 QCefQuery 请求

参数

返回值

成功时为true;否则为false


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

在指定的frame中执行javascript代码,此方法不报告javascript的结果。要获取 javascript 执行的结果,请使用 executeJavascriptWithResult

参数

  • frameId frame ID

  • code JavaScript代码

  • url 可在其中找到相关脚本的 URL(如果有)。渲染器可能会请求此 URL 以向开发人员显示错误的来源

返回值

成功时为true;否则为false


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

在指定的frame中执行javascript代码,结果将通过 reportJavascriptResult 信号发送

参数

  • frameId frame ID

  • code JavaScript 代码

  • url 可在其中找到相关脚本的 URL(如果有)。渲染器可能会请求此 URL 以向开发人员显示错误的来源

  • context 用于标识一个执行的上下文

返回值

成功时为true;否则为false


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

设置此浏览器的首选项

参数

  • name 首选项名称
  • value 首选项值,如果此值为 QVariant::UnknownType 或者 QVariant::Invalid, 则首选项将恢复为默认值
  • error 失败时填充的错误消息

返回值

成功时为true;否则为false


public void setDisablePopupContextMenu(bool disable)

设置是否禁用弹出浏览器的上下文菜单

参数

  • disable True 表示禁用;false 表示启用

public bool isPopupContextMenuDisabled()

获取是否禁用弹出浏览器的上下文菜单

返回值

True 表示禁用;false 表示启用


public bool hasDevTools()

检测此浏览器是否打开了devtools

返回值

如果已经打开,则为 true; 否则为 false


public void showDevTools()

打开 devtools 对话框


public void closeDevTools()

关闭 devtools 对话框


public void setEnableDragAndDrop(bool enable)

设置是否启用拖拽

参数

  • enable True 表示启用;false 表示禁用

不适用于OSR模式。注意这里有一个问题,当将文件拖动到非拖动区域时,将显示该文件的内容。你需要自己解决这个问题。


public bool isDragAndDropEnabled() const

获取是否启用拖拽

返回值

True 表示启用;false 表示禁用


public void setFocus(Qt::FocusReason reason)

请参考 QWidget::setFocus


public QVariant inputMethodQuery(Qt::InputMethodQuery query) const

请参考 QWidget::inputMethodQuery


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

在创建弹出式浏览器之前被调用

参数

  • frameId 源frame ID

  • targetUrl 目标网址

  • targetFrameName 目标名称

  • targetDisposition 目标窗口打开方法

  • settings 用于弹出窗口的设置

  • rect 用于弹出窗口的矩形

返回值

如果为 true,则取消弹出窗口;false表示允许


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

需要对新下载项的调用。保留对下载项的引用并调用 QCefDownloadItem::start 方法以允许并启动下载,忽略下载项以禁止下载

参数

  • item 新的下载项目

  • suggestedName 新的建议的名称


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

在更新下载项时调用。 若要获取 QCefDownloadItem::start 的方法,必须在 newDownloadItem 方法中调用

参数

  • item 下载项目

protected void paintEvent(QPaintEvent * event)

请参考 QWidget::paintEvent


protected void inputMethodEvent(QInputMethodEvent * event)

请参考 QWidget::inputMethodEvent


protected void showEvent(QShowEvent * event)

请参考 QWidget::showEvent


protected void hideEvent(QHideEvent * event)

请参考 QWidget::hideEvent


protected void focusInEvent(QFocusEvent * event)

请参考 QWidget::focusInEvent


protected void focusOutEvent(QFocusEvent * event)

请参考 QWidget::focusOutEvent


protected void resizeEvent(QResizeEvent * event)

请参考 QWidget::resizeEvent


protected void keyPressEvent(QKeyEvent * event)

请参考 QWidget::keyPressEvent


protected void keyReleaseEvent(QKeyEvent * event)

请参考 QWidget::keyReleaseEvent


protected void mouseMoveEvent(QMouseEvent * event)

请参考 QWidget::mouseMoveEvent


protected void mousePressEvent(QMouseEvent * event)

请参考 QWidget::mousePressEvent


protected void mouseReleaseEvent(QMouseEvent * event)

请参考 QWidget::mouseReleaseEvent


protected void wheelEvent(QWheelEvent * event)

请参考 QWidget::wheelEvent


protected void contextMenuEvent(QContextMenuEvent * event)

请参考 QWidget::contextMenuEvent


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

加载状态更改时调用

参数

  • browserId 表示浏览器 ID

  • isLoading 表示浏览器正在加载

  • canGoBack 表示浏览器可以返回

  • canGoForward 表示浏览器可以前进


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

在加载开始时被调用

参数

  • browserId 表示浏览器 ID

  • frameId 表示frame ID

  • isMainFrame 表示这是否是主frame

  • transition_type 过渡类型


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

在加载结束时被调用

参数

  • browserId 表示浏览器 ID

  • frameId 表示frame ID

  • isMainFrame 表示这是否是主frame

  • httpStatusCode HTTP 状态代码


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

由于错误导致加载失败时被调用

参数

  • browserId 表示浏览器 ID

  • frameId 表示frame ID

  • isMainFrame 表示这是否是主frame

  • errorCode 错误代码

  • errorMsg 错误消息

  • failedUrl 导致失败的网址


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

在可拖动区域更改时调用

参数

  • draggableRegion 新的可拖动区域

  • nonDraggableRegion 新的不可拖动区域


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

在网址更改时被调用

参数

  • frameId frame ID

  • url 网址


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

网站标题更改时被调用

参数

  • title 网站标题

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

网站图标地址更改时被调用

参数

  • urls 图标地址

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

网站图标更改时被调用

参数

  • icon 图标

{signal} public void fullscreenModeChanged(bool fullscreen)

在全屏模式更改时被调用

参数

  • fullscreen 当前全屏模式

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

状态消息更改时被调用

参数

  • message 状态信息

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

从 Web 内容调用控制台消息

参数

  • message 消息

  • level 级别


{signal} public void loadingProgressChanged(double progress)

加载进度更改时调用

参数

  • progress 当前进度

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

在新的 QCefQuery 请求上被调用

参数

  • browserId 浏览器 ID

  • frameId frame ID

  • query 查询请求


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

在从 Web 内容调用方法请求时调用(Javascript)

参数

  • browserId 浏览器 ID

  • frameId frame ID

  • method 方法名称

  • arguments 参数列表


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

对使用 executeJavascriptWithResult 执行的 javascript 的结果进行调用

参数

  • browserId 浏览器 ID

  • frameId frame ID

  • context 上下文

  • result 结果


{signal} public void nativeBrowserCreated(QWindow * window)

在创建原生浏览器窗口后调用。不适用于 OSR 模式。

参数

  • win CEF 窗口

{signal} public void popupCreated(QCefView * popup)

在创建弹出式浏览器后立即调用

参数

  • wnd 新创建的弹出式 QCefView 实例

弹出式浏览器的生命周期由弹出式浏览器的所有者管理,因此不要尝试保存弹出式浏览器实例。如果您需要实现浏览器选项卡,则应重写 onBeforePopup 方法并创建自己的 QCefView 浏览器实例,然后您可以根据需要操作创建的浏览器实例。


{slot} public inline void setFocus()


enum CefWindowOpenDisposition

表示 CEF 弹出窗口的打开配置枚举

ValuesDescriptions
CefWindowOpenDispositionUnknown
CefWindowOpenDispositionCurrentTab
CefWindowOpenDispositionSingletonTab
CefWindowOpenDispositionNewForeGroundTab
CefWindowOpenDispositionNewBackgroundTab
CefWindowOpenDispositionNewPopup
CefWindowOpenDispositionNewWindow
CefWindowOpenDispositionSaveToDisk
CefWindowOpenDispositionOffTheRecord
CefWindowOpenDispositionIgnoreAction

private QScopedPointer< QCefViewPrivate > d_ptr

- +

class QCefView

class QCefView
: public QWidget

表示 CEF 浏览器视图

总结

成员描述
public QCefView(const QString url, const QCefSetting * setting, QWidget * parent, Qt::WindowFlags f)QCefView 有参构造函数
public QCefView(QWidget * parent, Qt::WindowFlags f)QCefView 有参构造函数
public ~QCefView()QCefView 析构函数
public void addLocalFolderResource(const QString & path, const QString & url, int priority)添加具有本地 Web 资源目录的 url 映射项
public void addArchiveResource(const QString & path, const QString & url, const QString & password, int priority)使用包含 Web 资源的本地存档 (.zip) 文件添加 url 映射项
public int browserId()获取浏览器 ID
public bool isPopup()获取浏览器是否创建为弹出式浏览器
public void navigateToString(const QString & content)导航到内容
public void navigateToUrl(const QString & url)导航到网址
public bool browserCanGoBack()检查浏览器是否可以返回
public bool browserCanGoForward()检查浏览器是否可以前进
public void browserGoBack()要求浏览器返回
public void browserGoForward()要求浏览器前进
public bool browserIsLoading()检查浏览器是否正在加载
public void browserReload()要求浏览器重新加载
public void browserStopLoad()要求浏览器停止加载
public bool triggerEvent(const QCefEvent & event)触发主框架的事件
public bool triggerEvent(const QCefEvent & event, qint64 frameId)触发指定frame的事件
public bool broadcastEvent(const QCefEvent & event)为所有frame广播事件
public bool responseQCefQuery(const QCefQuery & query)响应 QCefQuery 请求
public bool executeJavascript(qint64 frameId, const QString & code, const QString & url)在指定的frame中执行javascript代码,此方法不报告javascript的结果。要获取 javascript 执行的结果,请使用executeJavascriptWithResult
public bool executeJavascriptWithResult(qint64 frameId, const QString & code, const QString & url, qint64 context)在指定的frame中执行javascript代码,结果将通过reportJavascriptResult 信号发送
public bool setPreference(const QString & name, const QVariant & value, const QString & error)设置此浏览器的首选项
public void setDisablePopupContextMenu(bool disable)设置是否禁用弹出浏览器的上下文菜单
public bool isPopupContextMenuDisabled()获取是否禁用弹出浏览器的上下文菜单
public bool hasDevTools()检测此浏览器是否打开了devtools
public void showDevTools()打开 devtools 对话框
public void closeDevTools()关闭 devtools 对话框
public void setEnableDragAndDrop(bool enable)设置是否启用拖拽
public bool isDragAndDropEnabled() const获取是否启用拖拽
public void setFocus(Qt::FocusReason reason)请参考 QWidget::setFocus
public QVariant inputMethodQuery(Qt::InputMethodQuery query) const请参考QWidget::inputMethodQuery
protected virtual bool onBeforePopup(qint64 frameId, const QString & targetUrl, const QString & targetFrameName, QCefView::CefWindowOpenDispositiontargetDisposition, QRect & rect,QCefSetting & settings)在创建弹出式浏览器之前被调用
protected virtual void onNewDownloadItem(const QSharedPointer< QCefDownloadItem > & item, const QString & suggestedName)需要对新下载项的调用。保留对下载项的引用并调用 QCefDownloadItem::start 方法以允许并启动下载,忽略下载项以禁止下载
protected virtual void onUpdateDownloadItem(const QSharedPointer< QCefDownloadItem > & item)在更新下载项时调用。 若要获取QCefDownloadItem::start的方法,必须在 newDownloadItem 方法中调用
protected void paintEvent(QPaintEvent * event)请参考 QWidget::paintEvent
protected void inputMethodEvent(QInputMethodEvent * event)请参考 QWidget::inputMethodEvent
protected void showEvent(QShowEvent * event)请参考 QWidget::showEvent
protected void hideEvent(QHideEvent * event)请参考 QWidget::hideEvent
protected void focusInEvent(QFocusEvent * event)请参考 QWidget::focusInEvent
protected void focusOutEvent(QFocusEvent * event)请参考 QWidget::focusOutEvent
protected void resizeEvent(QResizeEvent * event)请参考 QWidget::resizeEvent
protected void keyPressEvent(QKeyEvent * event)请参考 QWidget::keyPressEvent
protected void keyReleaseEvent(QKeyEvent * event)请参考 QWidget::keyReleaseEvent
protected void mouseMoveEvent(QMouseEvent * event)请参考 QWidget::mouseMoveEvent
protected void mousePressEvent(QMouseEvent * event)请参考 QWidget::mousePressEvent
protected void mouseReleaseEvent(QMouseEvent * event)请参考 QWidget::mouseReleaseEvent
protected void wheelEvent(QWheelEvent * event)请参考 QWidget::wheelEvent
protected void contextMenuEvent(QContextMenuEvent * event)请参考 QWidget::contextMenuEvent
{signal} public void loadingStateChanged(int browserId, bool isLoading, bool canGoBack, bool canGoForward)加载状态更改时调用
{signal} public void loadStart(int browserId, qint64 frameId, bool isMainFrame, int transition_type)在加载开始时被调用
{signal} public void loadEnd(int browserId, qint64 frameId, bool isMainFrame, int httpStatusCode)在加载结束时被调用
{signal} public void loadError(int browserId, qint64 frameId, bool isMainFrame, int errorCode, const QString & errorMsg, const QString & failedUrl)由于错误导致加载失败时被调用
{signal} public void draggableRegionChanged(const QRegion & draggableRegion, const QRegion & nonDraggableRegion)在可拖动区域更改时调用
{signal} public void addressChanged(qint64 frameId, const QString & url)在网址更改时被调用
{signal} public void titleChanged(const QString & title)网站标题更改时被调用
{signal} public void faviconURLChanged(const QStringList & urls)网站图标地址更改时被调用
{signal} public void faviconChanged(const QIcon & icon)网站图标更改时被调用
{signal} public void fullscreenModeChanged(bool fullscreen)在全屏模式更改时被调用
{signal} public void statusMessage(const QString & message)状态消息更改时被调用
{signal} public void consoleMessage(const QString & message, int level)从 Web 内容调用控制台消息
{signal} public void loadingProgressChanged(double progress)加载进度更改时调用
{signal} public void cefQueryRequest(int browserId, qint64 frameId, const QCefQuery & query)在新的 QCefQuery 请求上被调用
{signal} public void invokeMethod(int browserId, qint64 frameId, const QString & method, const QVariantList & arguments)在从 Web 内容调用方法请求时调用(Javascript)
{signal} public void reportJavascriptResult(int browserId, qint64 frameId, qint64 context, const QVariant & result)对使用 executeJavascriptWithResult 执行的 javascript 的结果进行调用
{signal} public void nativeBrowserCreated(QWindow * window)在创建原生浏览器窗口后调用。不适用于 OSR 模式。
{signal} public void popupCreated(QCefView * popup)在创建弹出式浏览器后立即调用
{slot} public inline void setFocus()请参考QWidget::setFocus
enum CefWindowOpenDisposition表示 CEF 弹出窗口的打开配置
private QScopedPointer< QCefViewPrivate > d_ptr

Members


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

QCefView 有参构造函数

参数

  • url 目标网址

  • setting QCefSetting 实例

  • parent 父对象


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

QCefView 有参构造函数

参数

  • parent 父对象

public ~QCefView()

QCefView 析构函数


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

添加具有本地 Web 资源目录的 url 映射项

参数

  • path 本地资源目录的路径

  • url 要映射到的网址

  • priority 优先级


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

使用包含 Web 资源的本地存档 (.zip) 文件添加 url 映射项

参数

  • path 本地存档文件的路径

  • url 要映射到的网址

  • password 存档的密码

  • priority 优先级


public int browserId()

获取浏览器 ID

返回值

浏览器 ID 标识


public bool isPopup()

获取浏览器是否创建为弹出式浏览器

返回值

如果是弹出式浏览器,则为 true;否则为false


public void navigateToString(const QString & content)

导航到内容

参数

  • content 内容

public void navigateToUrl(const QString & url)

导航到网址

参数

  • url 网址

public bool browserCanGoBack()

检查浏览器是否可以返回

返回值

如果可以,则为true;否则为false


public bool browserCanGoForward()

检查浏览器是否可以前进

返回值

如果可以,则为true;否则为false


public void browserGoBack()

要求浏览器返回


public void browserGoForward()

要求浏览器前进


public bool browserIsLoading()

检查浏览器是否正在加载

返回值

如果正在加载,则为 true;否则为false


public void browserReload()

要求浏览器重新加载


public void browserStopLoad()

要求浏览器停止加载


public bool triggerEvent(const QCefEvent & event)

触发主框架的事件

参数

返回值

成功时为true;否则为false


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

触发指定frame的事件

参数

返回值

成功时为true;否则为false


public bool broadcastEvent(const QCefEvent & event)

为所有frame广播事件

参数

返回值

成功时为true;否则为false


public bool responseQCefQuery(const QCefQuery & query)

响应 QCefQuery 请求

参数

返回值

成功时为true;否则为false


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

在指定的frame中执行javascript代码,此方法不报告javascript的结果。要获取 javascript 执行的结果,请使用 executeJavascriptWithResult

参数

  • frameId frame ID

  • code JavaScript代码

  • url 可在其中找到相关脚本的 URL(如果有)。渲染器可能会请求此 URL 以向开发人员显示错误的来源

返回值

成功时为true;否则为false


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

在指定的frame中执行javascript代码,结果将通过 reportJavascriptResult 信号发送

参数

  • frameId frame ID

  • code JavaScript 代码

  • url 可在其中找到相关脚本的 URL(如果有)。渲染器可能会请求此 URL 以向开发人员显示错误的来源

  • context 用于标识一个执行的上下文

返回值

成功时为true;否则为false


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

设置此浏览器的首选项

参数

  • name 首选项名称
  • value 首选项值,如果此值为 QVariant::UnknownType 或者 QVariant::Invalid, 则首选项将恢复为默认值
  • error 失败时填充的错误消息

返回值

成功时为true;否则为false


public void setDisablePopupContextMenu(bool disable)

设置是否禁用弹出浏览器的上下文菜单

参数

  • disable True 表示禁用;false 表示启用

public bool isPopupContextMenuDisabled()

获取是否禁用弹出浏览器的上下文菜单

返回值

True 表示禁用;false 表示启用


public bool hasDevTools()

检测此浏览器是否打开了devtools

返回值

如果已经打开,则为 true; 否则为 false


public void showDevTools()

打开 devtools 对话框


public void closeDevTools()

关闭 devtools 对话框


public void setEnableDragAndDrop(bool enable)

设置是否启用拖拽

参数

  • enable True 表示启用;false 表示禁用

不适用于OSR模式。注意这里有一个问题,当将文件拖动到非拖动区域时,将显示该文件的内容。你需要自己解决这个问题。


public bool isDragAndDropEnabled() const

获取是否启用拖拽

返回值

True 表示启用;false 表示禁用


public void setFocus(Qt::FocusReason reason)

请参考 QWidget::setFocus


public QVariant inputMethodQuery(Qt::InputMethodQuery query) const

请参考 QWidget::inputMethodQuery


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

在创建弹出式浏览器之前被调用

参数

  • frameId 源frame ID

  • targetUrl 目标网址

  • targetFrameName 目标名称

  • targetDisposition 目标窗口打开方法

  • settings 用于弹出窗口的设置

  • rect 用于弹出窗口的矩形

返回值

如果为 true,则取消弹出窗口;false表示允许


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

需要对新下载项的调用。保留对下载项的引用并调用 QCefDownloadItem::start 方法以允许并启动下载,忽略下载项以禁止下载

参数

  • item 新的下载项目

  • suggestedName 新的建议的名称


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

在更新下载项时调用。 若要获取 QCefDownloadItem::start 的方法,必须在 newDownloadItem 方法中调用

参数

  • item 下载项目

protected void paintEvent(QPaintEvent * event)

请参考 QWidget::paintEvent


protected void inputMethodEvent(QInputMethodEvent * event)

请参考 QWidget::inputMethodEvent


protected void showEvent(QShowEvent * event)

请参考 QWidget::showEvent


protected void hideEvent(QHideEvent * event)

请参考 QWidget::hideEvent


protected void focusInEvent(QFocusEvent * event)

请参考 QWidget::focusInEvent


protected void focusOutEvent(QFocusEvent * event)

请参考 QWidget::focusOutEvent


protected void resizeEvent(QResizeEvent * event)

请参考 QWidget::resizeEvent


protected void keyPressEvent(QKeyEvent * event)

请参考 QWidget::keyPressEvent


protected void keyReleaseEvent(QKeyEvent * event)

请参考 QWidget::keyReleaseEvent


protected void mouseMoveEvent(QMouseEvent * event)

请参考 QWidget::mouseMoveEvent


protected void mousePressEvent(QMouseEvent * event)

请参考 QWidget::mousePressEvent


protected void mouseReleaseEvent(QMouseEvent * event)

请参考 QWidget::mouseReleaseEvent


protected void wheelEvent(QWheelEvent * event)

请参考 QWidget::wheelEvent


protected void contextMenuEvent(QContextMenuEvent * event)

请参考 QWidget::contextMenuEvent


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

加载状态更改时调用

参数

  • browserId 表示浏览器 ID

  • isLoading 表示浏览器正在加载

  • canGoBack 表示浏览器可以返回

  • canGoForward 表示浏览器可以前进


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

在加载开始时被调用

参数

  • browserId 表示浏览器 ID

  • frameId 表示frame ID

  • isMainFrame 表示这是否是主frame

  • transition_type 过渡类型


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

在加载结束时被调用

参数

  • browserId 表示浏览器 ID

  • frameId 表示frame ID

  • isMainFrame 表示这是否是主frame

  • httpStatusCode HTTP 状态代码


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

由于错误导致加载失败时被调用

参数

  • browserId 表示浏览器 ID

  • frameId 表示frame ID

  • isMainFrame 表示这是否是主frame

  • errorCode 错误代码

  • errorMsg 错误消息

  • failedUrl 导致失败的网址


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

在可拖动区域更改时调用

参数

  • draggableRegion 新的可拖动区域

  • nonDraggableRegion 新的不可拖动区域


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

在网址更改时被调用

参数

  • frameId frame ID

  • url 网址


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

网站标题更改时被调用

参数

  • title 网站标题

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

网站图标地址更改时被调用

参数

  • urls 图标地址

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

网站图标更改时被调用

参数

  • icon 图标

{signal} public void fullscreenModeChanged(bool fullscreen)

在全屏模式更改时被调用

参数

  • fullscreen 当前全屏模式

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

状态消息更改时被调用

参数

  • message 状态信息

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

从 Web 内容调用控制台消息

参数

  • message 消息

  • level 级别


{signal} public void loadingProgressChanged(double progress)

加载进度更改时调用

参数

  • progress 当前进度

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

在新的 QCefQuery 请求上被调用

参数

  • browserId 浏览器 ID

  • frameId frame ID

  • query 查询请求


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

在从 Web 内容调用方法请求时调用(Javascript)

参数

  • browserId 浏览器 ID

  • frameId frame ID

  • method 方法名称

  • arguments 参数列表


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

对使用 executeJavascriptWithResult 执行的 javascript 的结果进行调用

参数

  • browserId 浏览器 ID

  • frameId frame ID

  • context 上下文

  • result 结果


{signal} public void nativeBrowserCreated(QWindow * window)

在创建原生浏览器窗口后调用。不适用于 OSR 模式。

参数

  • win CEF 窗口

{signal} public void popupCreated(QCefView * popup)

在创建弹出式浏览器后立即调用

参数

  • wnd 新创建的弹出式 QCefView 实例

弹出式浏览器的生命周期由弹出式浏览器的所有者管理,因此不要尝试保存弹出式浏览器实例。如果您需要实现浏览器选项卡,则应重写 onBeforePopup 方法并创建自己的 QCefView 浏览器实例,然后您可以根据需要操作创建的浏览器实例。


{slot} public inline void setFocus()


enum CefWindowOpenDisposition

表示 CEF 弹出窗口的打开配置枚举

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/zh/docs/reference/WebAPIs/index.html b/zh/docs/reference/WebAPIs/index.html index 4676c62b..bcb15237 100644 --- a/zh/docs/reference/WebAPIs/index.html +++ b/zh/docs/reference/WebAPIs/index.html @@ -4,13 +4,13 @@ Web APIs | QCefView - +

Web APIs

object window.CefViewClient

QCefView 为所有浏览器框架添加了CefViewClientwindow 的 Javascript 桥接对象,使用这个桥接对象,你可以在任何时候执行本机和 Web 上下文之间的通信

总结

成员描述
addEventListener(name, listener)为具有指定名称的事件添加 listener
removeEventListener(name, listener)删除具有指定名称的事件的 listener
invokeMethod(name, ...args)调用具有指定名称和参数的本机方法

Members


addEventListener(name, listener)

为具有指定名称的事件添加 listener

参数
  • name 事件名称
  • listener listener 回调函数

removeEventListener(name, listener)

删除具有指定名称的事件的 listener

参数
  • name 事件名称
  • listener listener 回调函数

invokeMethod(name, ...args)

调用具有指定名称和参数的本机方法

参数
  • name 方法名称
  • ..args 方法的参数

object window

QCefView 为所有浏览器框架的对象添加了一些额外的方法,使用这些方法,您可以在本机上下文和 Web 上下文之间执行通信window

总结

成员描述
window.CefViewQuery(query)将 cef 查询请求发送到本机上下文
window.CefViewQueryCancel(id)取消具有指定 id 的查询请求

Members


window.CefViewQuery(query)

将 cef 查询请求发送到本机上下文

参数
  • query 查询对象
返回值
  • 查询 ID

window.CefViewQueryCancel(id)

取消具有指定 id 的查询请求

参数
  • id 查询 ID
- + \ No newline at end of file diff --git a/zh/docs/reference/index.html b/zh/docs/reference/index.html index d9bb7ffa..00de1c89 100644 --- a/zh/docs/reference/index.html +++ b/zh/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/zh/index.html b/zh/index.html index 97c3576d..f6abdbe2 100644 --- a/zh/index.html +++ b/zh/index.html @@ -4,13 +4,13 @@ QCefView | QCefView - +

QCefView

基于QWidget集成CEF的Web View 组件

[object Object]

便捷集成

通过精巧的封装,让开发者可以方便快捷的使用Qt框架来发掘CEF丰富强大的能力.

[object Object]

跨平台支持

支持多平台架构,让你的App以一份前端代码运行于全部主流桌面端,Windows/macOS/Linux全平台支持.

[object Object]

由Qt和CEF提供支持

像使用其他任何Widget一样在Qt框架中使用CEF开发混合架构应用,无需了解CEF丰富繁杂的架构和接口.

- + \ No newline at end of file