更新代码
parent
f78655a9e5
commit
6806857a82
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -1,5 +1,5 @@
|
|||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
|
@ -9,7 +9,7 @@
|
|||
and Qt device independent pixels. -->
|
||||
<meta name="viewport" content="width=device-width, height=device-height, user-scalable=0"/>
|
||||
|
||||
<title>Qt自定义控件大全 V2021 (QQ:517216493 WX: feiyangqingyun)</title>
|
||||
<title>examples</title>
|
||||
<style>
|
||||
/* Make the html body cover the entire (visual) viewport with no scroll bars. */
|
||||
html, body { padding: 0; margin: 0; overflow:hidden; height: 100vh }
|
||||
|
@ -25,9 +25,9 @@
|
|||
<figure style="overflow:visible;" id="qtspinner">
|
||||
<center style="margin-top:1.5em; line-height:150%">
|
||||
<img src="qtlogo.svg" width="320" height="200" style="display:block"></img>
|
||||
<strong>Qt自定义控件大全 V2021 (QQ:517216493 WX: feiyangqingyun)</strong>
|
||||
<strong>Qt for WebAssembly: examples</strong>
|
||||
<div id="qtstatus"></div>
|
||||
<noscript>JavaScript不可用</noscript>
|
||||
<noscript>JavaScript is disabled. Please enable JavaScript to use this application.</noscript>
|
||||
</center>
|
||||
</figure>
|
||||
<canvas id="qtcanvas" oncontextmenu="event.preventDefault()" contenteditable="true"></canvas>
|
||||
|
|
|
@ -265,7 +265,7 @@ function QtLoader(config)
|
|||
|
||||
function fetchThenCompileWasm(response) {
|
||||
return response.arrayBuffer().then(function(data) {
|
||||
self.loaderSubState = "正在编译";
|
||||
self.loaderSubState = "Compiling";
|
||||
setStatus("Loading") // trigger loaderSubState udpate
|
||||
return WebAssembly.compile(data);
|
||||
});
|
||||
|
@ -274,7 +274,7 @@ function QtLoader(config)
|
|||
function fetchCompileWasm(filePath) {
|
||||
return fetchResource(filePath).then(function(response) {
|
||||
if (typeof WebAssembly.compileStreaming !== "undefined") {
|
||||
self.loaderSubState = "第一步: 下载 / 第二步: 编译";
|
||||
self.loaderSubState = "Downloading/Compiling";
|
||||
setStatus("Loading");
|
||||
return WebAssembly.compileStreaming(response).catch(function(error) {
|
||||
// compileStreaming may/will fail if the server does not set the correct
|
||||
|
@ -312,7 +312,7 @@ function QtLoader(config)
|
|||
// Continue waiting if loadEmscriptenModule() is called again
|
||||
if (publicAPI.status == "Loading")
|
||||
return;
|
||||
self.loaderSubState = "正在下载";
|
||||
self.loaderSubState = "Downloading";
|
||||
setStatus("Loading");
|
||||
|
||||
// Fetch emscripten generated javascript runtime
|
||||
|
|
Loading…
Reference in New Issue