Главная | Actual Topics | Обратная связь | В избранное | Сделать домашней | Антиспам ;)
 System & Utilities
 Unix News
 OS Emulator
Каталог статей
Все статьи

Биллу Гейтсу тоже предлагают избавиться ...
Вымогательство в борьбе со спамом

February, 2019
Какой из этих ОС Вы отдаете большее предпочтение?

Mac OS
Windows XP
Windows 2003
Что такое ОС? :)

Другие опросы

Всего голосов: 327
Комментарии: 0

Архив Новостей
 February 2019 (9)
 January 2019 (9)
 December 2018 (13)
 November 2018 (7)
 October 2018 (13)
 September 2018 (8)
 August 2018 (8)
 July 2018 (11)
 June 2018 (13)
 May 2018 (10)
 April 2018 (14)
 March 2018 (11)
 February 2018 (13)
 January 2018 (13)
 December 2017 (14)
 November 2017 (15)
 October 2017 (19)
 September 2017 (18)
 August 2017 (13)
 February 2017 (14)
 January 2017 (19)
 December 2016 (16)
 November 2016 (16)
 October 2016 (21)
 September 2016 (18)
 August 2016 (16)
 July 2016 (16)
 June 2016 (20)
 May 2016 (18)
 April 2016 (15)
 March 2016 (22)
 February 2016 (17)
 January 2016 (15)
 December 2015 (15)
 November 2015 (22)
 October 2015 (20)
 September 2015 (17)
 August 2015 (25)
 July 2015 (20)
 June 2015 (23)
 May 2015 (21)
 April 2015 (17)
 March 2015 (19)
 February 2015 (9)
 January 2015 (23)
 December 2014 (9)
 November 2014 (13)
 October 2014 (12)
 September 2014 (18)
 August 2014 (20)
 July 2014 (10)
 June 2014 (12)
 May 2014 (12)
 April 2014 (10)
 March 2014 (22)
 February 2014 (10)
 January 2014 (8)
 December 2013 (26)
 November 2013 (53)
 October 2013 (40)
 September 2013 (48)
 August 2013 (63)
 July 2013 (56)
 June 2013 (52)
 May 2013 (49)
 April 2013 (67)
 March 2013 (74)
 February 2013 (63)
 January 2013 (62)
 December 2012 (62)
 November 2012 (66)
 October 2012 (68)
 September 2012 (48)
 August 2012 (75)
 July 2012 (60)
 June 2012 (71)
 May 2012 (69)
 April 2012 (85)
 March 2012 (86)
 February 2012 (90)
 January 2012 (81)
 December 2011 (103)
 November 2011 (118)
 October 2011 (74)
 September 2011 (2)
 June 2011 (110)
 May 2011 (118)
 April 2011 (111)
 March 2011 (112)
 February 2011 (101)
 January 2011 (119)
 December 2010 (117)
 November 2010 (118)
 October 2010 (131)
 September 2010 (117)
 August 2010 (226)
 July 2010 (351)
 June 2010 (305)
 May 2010 (319)
 April 2010 (343)
 March 2010 (329)
 February 2010 (311)
 January 2010 (312)
 December 2009 (266)
 November 2009 (156)
 July 2009 (101)
 June 2009 (279)
 May 2009 (365)
 April 2009 (348)
 March 2009 (347)
 February 2009 (323)
 January 2009 (318)
 December 2008 (237)
 November 2008 (155)
 October 2008 (334)
 September 2008 (310)
 August 2008 (343)
 July 2008 (362)
 June 2008 (322)
 May 2008 (429)
 April 2008 (1276)
 March 2008 (1658)
 February 2008 (250)
 January 2008 (6)
 November 2007 (1)
 September 2007 (1)
 June 2007 (1)
 May 2007 (1)
 March 2007 (1)
 January 2007 (2)
 December 2006 (1)
 October 2006 (2)
 September 2006 (1)
 August 2006 (2)

Getting Started With Qt for WebAssembly

System & Utilities

We’ve previously blogged about some of the features of Qt for WebAssembly. In this blog post we’ll take a look at how to get started: building Qt, building your application, and finally deploying the application.

If you would like to know more about this topic, then please join me for the Qt for WebAssembly webinar on November 27th.


The first step is installing emscripten. Please refer to the emscripten documentation for how to do so, and also note that Qt requires a unix host system: GNU/linux, macOS, or Windows subsystem for Linux. When done you should have a working em++ compiler in the path:

$ em++ --version
emcc (Emscripten gcc/clang-like replacement) 1.38.16 (commit 7a0e27441eda6cb0e3f1210e6837cae4b080ab4c)

Qt for WebAssembly applications are also Emscripten-based applications. Qt makes use of many of its features and so can application code.


Next, install the Qt 5.12 sources, for example using the online installer:


Build Qt from source and specify that we are cross-compiling for wasm using emscripten:

$ ~/Qt/5.12.0/Src/configure -xplatform wasm-emscripten
$ make

This Qt build is different from standard desktop builds in two additional ways: It is a static build, and does not support threads. Depending on how your application is structured and which features you use this may pose a problem. One way to find out is to make a separate “-static -no-feature-thread” desktop Qt build, and then debug/fix any issues there. The reason this may be preferable is that the build-debug cycle is usually faster on desktop, and you have a working debugger.

Your Application

Finally, build the application. Qmake is the currently supported build system.

$ /path/to/qt-wasm/qtbase/bin/qmake
$ make

This will produce several output files:

Name Producer Purpose
app.html Qt HTML container
qtloader.js Qt JS API for loading Qt apps
app.js emscripten app runtime and JS API
app.wasm emscripten app binary

Here, the app.wasm contains the majority (if not all) of the application and Qt code, while the .js files provide loading and run-time support.

The .html file provides the html page structure which contains the application as a <canvas> element. The default version of this file displays a Qt logo during the loading and compile stage and contains a simple HTML page structure which makes the application use the entire browser viewport. You will probably want to replace this with application-specific branding and perhaps integrate with existing html content.

For qtloader.js our intention is to have a public and stable API for loading Qt-based applications, but we are not there yet and the API in that file is subject so change.

The files are plain data files and can be served from any http server; there is no requirement for any special active server component or plugin. Note that loading from the file system is not supported by current browsers. I use Python http.server for development, which works well.

When deploying applications we do recomned using a server that supports compression. The following table gives an indication of what the expected file sizes (for the main .wasm file) are:

Qt Modules gzip brotli
Core Gui 2.8MB 2.1MB
Core Gui Widgets 4.3MB 3.2MB
Core Gui Widgets Quick Charts 8.6MB 6.3MB

gzip is a good default choice as compressor and is supported by most web servers. brotli provides a nice compression gain and is supported by all wasm-enabled browsers.


The final result of all this should be your application running in a web browser, here represented by the Slate app created by my colleague Mitch. Slate is a Qt Quick Controls 2 based image editor.


A live version is available as well. If you’ve looked at this demo before the news is that it should be actually usable now: local file access is possible and there are few or none visual glitches.

For those that are attending Qt World Summit in Berlin next month: I look forward to seeing you there. If you a are not going then let me link to the webinar once again.

The post Getting Started With Qt for WebAssembly appeared first on Qt Blog.


Разместил: Planet KDE | Дата: 19.11.2018 | Прочитано: 122 | Раздел: System & Utilities   
16 | System & Utilities | | Planet KDE |

Рейтинг статьи

Средняя оценка: 0.00/0Средняя оценка: 0Всего голосов:0

Хорошо Нормально Пойдёт Плохо

Смотрите также связанные темы

12.08.2016 KDE Announces the First Public Release of Their Kirigami UI Framework for Mobile
Work on the Kirigami user interface framework started back in March 2016, when the KDE development team announced their plans for creating one of the most powerful and sophisticated tool that would allow application developers to build cross-platform Qt-based apps for mobile platforms.
21.01.2018 About Babe
I've been working on a small music player named Babe for a while now, it started as an idea of a bare simple music player, and as the time has passed it has become a project I hope to expand beyond a simple music player. Last year I presented the project to the KDE community at Akademy 2017 that took place in Almeria-Spain, I wanted to highlight back then the idea of a multimedia desktop application that was aware of its content by making use of the wide knowledge that could be found on the internet, by making use of a music information retrieval system called Pulpo together with AI techni...
11.03.2008 March of the plugins
When we last left our adventurers, Andrew Kutz had launched with his (unsupported, reverse-engineered) plugins for VI3 VirtualCenter. In the interim, he now has: Name Version Free Open Source Description SVMotion 0.4.4 Yes Yes The plugin that started it...
28.03.2008 KDE and OpenUsability Offer Summer Stipends for Students
Saturday, March 22 2008 @ 12:58 CST Contributed by: Linegod From KDE News : Our friends over at OpenUsability have just started a call for students of usability, user-interface design, and interaction design or ...
05.04.2008 Help the Libre Graphics Meeting
The Libre Graphics Meeting organization has started a donation drive: the money collected is meant to make fund the travel and accommodation cost of as many developers of free graphics software as possible.
03.09.2008 Installing, configuring, patching ESXi (+ bonus links)
A ESXi trifecta from Eric Siebert: Link: Installing and configuring VMware ESXi. A good place to get started. Link: Two ways to patch VMware ESXi Installable. Bonus links: Here's a good one. Comparison of ESX and ESXi: (If...
03.03.2009 Update Manager Causes the VI Client to Inappropriately Display the Reconfiguring virtual machine Task for Linux Virtual Machines (1008729)
When the VMware Update Manager Service is started, the VI Client might inappropriately display the task...
10.03.2009 Deploying ThinApp packages using an Active Directory policy fails (1008888)
· The application may install normally when manually installed. · When the computer is started it indicates that it is installing the software ThinApp packages assigned to...
10.05.2010 EMC World 2010 - let's talk private cloud - live streaming
EMC World 2010 - let's talk private cloud - live streaming [Executive summary: We'll be blogging about private cloud for the next three days here at EMC World 2010. Stuck at your desk? Follow along with EMC World 2010 live video from SiliconANGLE's #TheCube.] I'm here in Boston to attend EMC World 2010. The theme, plastered everywhere at the venue and across the city (that's a sign at the taxi stand at Logan Airport over to the right) is "The Journey to the Private Cloud Starts Now." Thousands of infrastructure geeks are here to get their EMC on, and I'll be co...
19.05.2010 Google and VMware's "Open PaaS" Strategy
Google and VMware's "Open PaaS" Strategy - Posted by Steve Herrod Chief Technology Officer Wow… it has been an incredibly exciting, err, Spring for VMware's SpringSource division. In early April, we announced the acquisition of Rabbit Technologies, leaders of the open source RabbitMQ products used by thousands of customers for highly scalable, and reliable application messaging. In late April, we announced VMforce, a partnership between VMware and to build an enterprise Java cloud with access to the vast data and great application services offered by the Force.c...
Нет комментариев. Почему бы Вам не оставить свой?
Вы не можете отправить комментарий анонимно, пожалуйста зарегистрируйтесь.
Google Search


Топ Новостей
1: Fedora and KDE/spin\'s treatment - Discussion
Просмотров - 3264

2: Offline Vaults for an extra layer of protection
Просмотров - 821

3: KDE\'s Kirigami 2.0 Framework for Convergent UIs Enters Beta with New Features
Просмотров - 795

4: Come dine with the KDE e.V. board in Berlin in October
Просмотров - 714

5: Akonadi/KMail issues on Tumbleweed?
Просмотров - 712

6: Debugging issues booting a PC in 2018
Просмотров - 707

7: Netrunner Desktop 16.09 "Avalon" Linux OS Is Out with Kernel 4.7, KDE Plasma 5.7
Просмотров - 690

8: plib3.gui 0.9.9
Просмотров - 677

9: KDevelop 5.0.2 released for Windows and Linux
Просмотров - 673

10: Konstruct
Просмотров - 660

11: KDE Connect Sprint
Просмотров - 643

12: Best Desktop Environment
Просмотров - 641

13: KDE Connect – State of the union
Просмотров - 641

14: Help Canonical Test GNOME Patches, Android Apps Illegally Tracking Kids, MySQL 8.0 Released and More
Просмотров - 633

15: Bluestar Gives Arch Linux a Celestial Glow
Просмотров - 618

Google 120X240

Главная | Actual Topics | Статьи | Обратная связь | Guest Book
Генерация: 1.753 сек. и 13 запросов к базе данных за 1.233 сек.
Powered by SLAED CMS © 2005-2007 SLAED. All rights reserved.