File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ QmlWeb . registerQmlType ( {
2
+ module : "QtWebKit" ,
3
+ name : "WebView" ,
4
+ versions : / ^ 3 \. / ,
5
+ baseClass : "QtWebView.WebView" , // It"s easier this way
6
+ enums : {
7
+ ErrorDomain : {
8
+ NoErrorDomain : 0 , InternalErrorDomain : 1 , NetworkErrorDomain : 2 ,
9
+ HttpErrorDomain : 3 , DownloadErrorDomain : 4
10
+ } ,
11
+ LoadStatus : {
12
+ LoadStartedStatus : 1 , LoadSucceededStatus : 2 , LoadFailedStatus : 3
13
+ } ,
14
+ NavigationRequestAction : { AcceptRequest : 0 , IgnoreRequest : 255 } ,
15
+ NavigationType : {
16
+ LinkClickedNavigation : 0 , FormSubmittedNavigation : 1 ,
17
+ BackForwardNavigation : 2 , ReloadNavigation : 3 ,
18
+ FormResubmittedNavigation : 4 , OtherNavigation : 5
19
+ }
20
+ } ,
21
+ properties : {
22
+ icon : "url"
23
+ } ,
24
+ signals : {
25
+ navigationRequested : [
26
+ { type : "var" , name : "request" }
27
+ ] ,
28
+ linkHovered : [
29
+ { type : "url" , name : "hoveredUrl" } ,
30
+ { type : "string" , name : "hoveredTitle" }
31
+ ]
32
+ }
33
+ } , class {
34
+ constructor ( meta ) {
35
+ QmlWeb . callSuper ( this , meta ) ;
36
+
37
+ // TODO: implement more features on top of WebView
38
+ }
39
+ } ) ;
You can’t perform that action at this time.
0 commit comments