更新代码

This commit is contained in:
feiyangqingyun
2023-06-27 11:33:58 +08:00
parent d5d4689a6f
commit 9bd183a595
4 changed files with 9 additions and 9 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -1,5 +1,5 @@
<!doctype html> <!doctype html>
<html lang="zh-CN"> <html lang="en-us">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -9,7 +9,7 @@
and Qt device independent pixels. --> and Qt device independent pixels. -->
<meta name="viewport" content="width=device-width, height=device-height, user-scalable=0"/> <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> <style>
/* Make the html body cover the entire (visual) viewport with no scroll bars. */ /* Make the html body cover the entire (visual) viewport with no scroll bars. */
html, body { padding: 0; margin: 0; overflow:hidden; height: 100vh } html, body { padding: 0; margin: 0; overflow:hidden; height: 100vh }
@@ -25,9 +25,9 @@
<figure style="overflow:visible;" id="qtspinner"> <figure style="overflow:visible;" id="qtspinner">
<center style="margin-top:1.5em; line-height:150%"> <center style="margin-top:1.5em; line-height:150%">
<img src="qtlogo.svg" width="320" height="200" style="display:block"></img> <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> <div id="qtstatus"></div>
<noscript>JavaScript不可用</noscript> <noscript>JavaScript is disabled. Please enable JavaScript to use this application.</noscript>
</center> </center>
</figure> </figure>
<canvas id="qtcanvas" oncontextmenu="event.preventDefault()" contenteditable="true"></canvas> <canvas id="qtcanvas" oncontextmenu="event.preventDefault()" contenteditable="true"></canvas>

View File

@@ -265,7 +265,7 @@ function QtLoader(config)
function fetchThenCompileWasm(response) { function fetchThenCompileWasm(response) {
return response.arrayBuffer().then(function(data) { return response.arrayBuffer().then(function(data) {
self.loaderSubState = "正在编译"; self.loaderSubState = "Compiling";
setStatus("Loading") // trigger loaderSubState udpate setStatus("Loading") // trigger loaderSubState udpate
return WebAssembly.compile(data); return WebAssembly.compile(data);
}); });
@@ -274,7 +274,7 @@ function QtLoader(config)
function fetchCompileWasm(filePath) { function fetchCompileWasm(filePath) {
return fetchResource(filePath).then(function(response) { return fetchResource(filePath).then(function(response) {
if (typeof WebAssembly.compileStreaming !== "undefined") { if (typeof WebAssembly.compileStreaming !== "undefined") {
self.loaderSubState = "第一步: 下载 / 第二步: 编译"; self.loaderSubState = "Downloading/Compiling";
setStatus("Loading"); setStatus("Loading");
return WebAssembly.compileStreaming(response).catch(function(error) { return WebAssembly.compileStreaming(response).catch(function(error) {
// compileStreaming may/will fail if the server does not set the correct // 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 // Continue waiting if loadEmscriptenModule() is called again
if (publicAPI.status == "Loading") if (publicAPI.status == "Loading")
return; return;
self.loaderSubState = "正在下载"; self.loaderSubState = "Downloading";
setStatus("Loading"); setStatus("Loading");
// Fetch emscripten generated javascript runtime // Fetch emscripten generated javascript runtime