Admittedly, building Qt WebAssembly apps takes what seems like forever. Technically, it is the linking part that takes a huge amount of time, as that is where the magic happens.
You may have missed my first blog regarding faster build times for Qt WebAssembly apps:
http://qtandeverything.blogspot.com/2019/06/faster-link-time-for-qt-webassembly.html
Here is how to get set up to use this now integrated feature.
1. You need emscripten with upstream clang, which has support for transpiling directly to wasm, instead of taking the intermediary step of building javascript, then outputting wasm binary with that. Starting with version 1.39.0, upstream clang is the default. You can use "latest" to get 1.39.x or something like "sdk-upstream-1.38.43-64bit" to get an earlier version.
./emsdk install latest
./emsdk activate --embedded latest
source ./emsdk_env.sh
You can then configure and rebuild Qt with -device-option WASM_OBJECT_FILES=1
configure -xplatform wasm-emscripten -developer-build -nomake tests -nomake examples -opensource -confirm-license -verbose -compile-examples -no-warnings-are-errors -release -device-option WASM_OBJECT_FILES=1
Then you can build your Qt app as normal using the qmake from that build, and watch the build time speed up!
*NOTE* Using WASM_OBJECT_FILES with a multi-threaded build is still experimental, as both threads and using wasm object files in emscriptem/wasm and Qt are experimental. I have not seen any real issues regarding the use of both of these at the same time.
You can read more about Qt for WebAssembly, mobile and embedded development in the book Hands-On Mobile and Embedded Development with Qt 5
thoughts from a developer. Author of Hands-on Mobile and Embedded Development with Qt 5 http://bit.ly/HandsOnMobileEmbedded
Showing posts with label qml. Show all posts
Showing posts with label qml. Show all posts
Wednesday, January 8, 2020
Friday, May 3, 2019
Mobile and Embedded Development with Qt
At times it was a bit painful juggling writing a book, doing my day job and running around doing the things that life throws. It's done and dusted now, you too can buy my book titled Hands-On Mobile and Embedded Development with Qt 5! It has a nice image of glacier ice on the cover, which I thought was appropriate for a technology founded in Norway and then continued in Finland.
https://www.packtpub.com/application-development/hands-mobile-and-embedded-development-qt-5
A big thanks to the co-founder of Trolltech, Eirik Chambe-Eng, who was gracious enough to write the forward at the last second. Tons of thanks to all the editors who also worked on this book.
One of the things I learned writing this book is that Qt is big. I already knew that, but now it's plainly apparent just how big it has grown. Not only are there major companies developing products with Qt, but it has a lot of different functionality and is not just about desktop widgets. There are a huge number of classes to cover.
You can check out the table of contents if you want to see what is covered and included. One area that I did not include is OpenGL ES. This is a huge topic and easily a book on it's own. It's something I would like to know more about, which is why I did not feel qualified to cover it. You need to know OpenGL Shader Language (GLSL), and I did not have the time to discover that to any real depth.
I hope that I covered topics that are relevant for mobile, embedded and IoT developers. From QtWidgets, QtQuick, QtSensors (of course) to In-app purchasing and building an embedded system with Qt Company's Boot To Qt and Yocto. I also explore Qt's newest platform - Qt for WebAssembly, which allows you to serve Qt applications from a web server to run in a web browser.
Enjoy!
https://www.packtpub.com/application-development/hands-mobile-and-embedded-development-qt-5
A big thanks to the co-founder of Trolltech, Eirik Chambe-Eng, who was gracious enough to write the forward at the last second. Tons of thanks to all the editors who also worked on this book.
One of the things I learned writing this book is that Qt is big. I already knew that, but now it's plainly apparent just how big it has grown. Not only are there major companies developing products with Qt, but it has a lot of different functionality and is not just about desktop widgets. There are a huge number of classes to cover.
You can check out the table of contents if you want to see what is covered and included. One area that I did not include is OpenGL ES. This is a huge topic and easily a book on it's own. It's something I would like to know more about, which is why I did not feel qualified to cover it. You need to know OpenGL Shader Language (GLSL), and I did not have the time to discover that to any real depth.
I hope that I covered topics that are relevant for mobile, embedded and IoT developers. From QtWidgets, QtQuick, QtSensors (of course) to In-app purchasing and building an embedded system with Qt Company's Boot To Qt and Yocto. I also explore Qt's newest platform - Qt for WebAssembly, which allows you to serve Qt applications from a web server to run in a web browser.
Enjoy!
Sunday, February 2, 2014
The other half of the Jolla story
They say there are two sides to every coin, and that holds true for the story of the history leading up to Jolla and it's Sailfish OS. The Jolla story usually starts out with Nokia, but it's really a convergence with Nokia as the center point.
This side of the story starts in Norway, not Finland. Oslo, in fact. Not with Nokia, but with a small company named Trolltech.
I won't start at the very beginning but skip to the part where I join in and include a bit about myself. It was 2001, I was writing a Qt based app called Gutenbrowser. I got an email from A. Kozak at Trolltech, makers of Qt. Saying that Sharp was planning to release a new PDA based on Qt, and wouldn't it be cool if Gutenbrowser would be ported to it? I replied, yes, but as I have no device it might be difficult. He replied back with a name/email of a guy that might be able to help. Sharp was putting on a Developer Symposium where they were going to announce the Zaurus and hand out devices to developers. I jumped at the chance.
It was in California. At that time I was in Colorado. Jason Perlow was working for Sharp at that time, and said he had an extra invite to the Developer symposium. WooHoo! The Zaurus was going to run a Qt based interface originally named QPE, later named Qtopia (and even later renamed Qt Extended). The sdk was released, so I downloaded it and started porting even before I had a device to test it on.
Qtopia was open source, and it was available for developers to tinker with, and put on other devices. There was a community project based on the open source Qtopia called Opie that I became involved with. That turned into me getting a job with Trolltech in Australia, where Qtopia was being developed, as the Qtopia Community Liaison, which luckily later somehow turned into a developer job.
Around the time that Nokia came out with the Maemo tablets, I was putting Qtopia on them. N770, N800, N810, and N900 all got the Qt/Qtopia treatment. (Not to mention the OpenMoko phones I did as well).
Then I was told to flash a Qtopia on an N810 because some Trolls were meeting with Nokia. That became two or three images I had to flash over the coarse of a few weeks. I knew something was up.
Around this time, one of the Brisbane developers (A. Kennedy, I'm looking at you!) had a Creative Friday project to make a dynamic user interface framework using xml. (Creative Friday was something Trolltech did that allowed developers to spend every Friday (unless impending doom of bug fixes/release) of their time on research projects) It was really quite fluid and there was a "prototype" interface running on that N810 as well. It only took a few lines of non c++ code to get dynamic UI's. This would have turned into what the next generation of Qtopia's interface would be made with. It was (and still is) quite amazing.
Then came the news that Nokia was buying Trolltech! Holy cow! A HUGE company that makes zillions of phones wanted to buy little ol' Trolltech. But they already had a Linux based interface - Maemo that was based on Gtk toolkit, and not Qt. WTH!?
Everyone speculated they wanted Trolltech for Qtopia. Wrong. Nokia wanted Qt, and decided to ditch Qtopia. We had a wake for the Qtopia event loop to say our good riddance. All of us in Brissie worried about our jobs.
So our little Trolltech got assimilated into this huge behemoth phone company from Finland. Or was it that Trolltech took over Nokia...? Nokia had plans for Qt that would provide a common toolkit for their massively popular Symbian and new Linux based phones.
The Brisbane office started working on creating the QtMobility API's. Yes, there are parts of Qtopia in QtMobility.
Meanwhile, that creative friday xml interface was still being worked on. It got canceled a few times and also revived a few. That eventually evolved into QML, and QtQuick.
Then came N9 and MeeGo, which was going to use this new fangled dynamic UI. MeeGo was also open source, and it's community version was called Mer and Nemo. Yes, there are parts of Qtopia in MeeGo.
The rest of the story is famous, or rather, infamous now. Nokia made redundant the people working on MeeGo. Later on, all of us Brisbane developers, QA and others were also made redundant. The rest of what I call the Trolltech entity got sold to Digia. The QA server room was packed up and shipped to Digia, who is doing a fantastic job of getting Qt Everywhere!
A few of those guys that were working on MeeGo got together and created a company called Jolla, and created a Linux based mobile OS based on Mer named Sailfish. Yes, there are a few Trolltech Trolls working for Jolla. and yes, there are parts of Qtopia in Sailfish.
This side of the story starts in Norway, not Finland. Oslo, in fact. Not with Nokia, but with a small company named Trolltech.
I won't start at the very beginning but skip to the part where I join in and include a bit about myself. It was 2001, I was writing a Qt based app called Gutenbrowser. I got an email from A. Kozak at Trolltech, makers of Qt. Saying that Sharp was planning to release a new PDA based on Qt, and wouldn't it be cool if Gutenbrowser would be ported to it? I replied, yes, but as I have no device it might be difficult. He replied back with a name/email of a guy that might be able to help. Sharp was putting on a Developer Symposium where they were going to announce the Zaurus and hand out devices to developers. I jumped at the chance.
It was in California. At that time I was in Colorado. Jason Perlow was working for Sharp at that time, and said he had an extra invite to the Developer symposium. WooHoo! The Zaurus was going to run a Qt based interface originally named QPE, later named Qtopia (and even later renamed Qt Extended). The sdk was released, so I downloaded it and started porting even before I had a device to test it on.
Qtopia was open source, and it was available for developers to tinker with, and put on other devices. There was a community project based on the open source Qtopia called Opie that I became involved with. That turned into me getting a job with Trolltech in Australia, where Qtopia was being developed, as the Qtopia Community Liaison, which luckily later somehow turned into a developer job.
Around the time that Nokia came out with the Maemo tablets, I was putting Qtopia on them. N770, N800, N810, and N900 all got the Qt/Qtopia treatment. (Not to mention the OpenMoko phones I did as well).
Then I was told to flash a Qtopia on an N810 because some Trolls were meeting with Nokia. That became two or three images I had to flash over the coarse of a few weeks. I knew something was up.
Around this time, one of the Brisbane developers (A. Kennedy, I'm looking at you!) had a Creative Friday project to make a dynamic user interface framework using xml. (Creative Friday was something Trolltech did that allowed developers to spend every Friday (unless impending doom of bug fixes/release) of their time on research projects) It was really quite fluid and there was a "prototype" interface running on that N810 as well. It only took a few lines of non c++ code to get dynamic UI's. This would have turned into what the next generation of Qtopia's interface would be made with. It was (and still is) quite amazing.
Then came the news that Nokia was buying Trolltech! Holy cow! A HUGE company that makes zillions of phones wanted to buy little ol' Trolltech. But they already had a Linux based interface - Maemo that was based on Gtk toolkit, and not Qt. WTH!?
Everyone speculated they wanted Trolltech for Qtopia. Wrong. Nokia wanted Qt, and decided to ditch Qtopia. We had a wake for the Qtopia event loop to say our good riddance. All of us in Brissie worried about our jobs.
So our little Trolltech got assimilated into this huge behemoth phone company from Finland. Or was it that Trolltech took over Nokia...? Nokia had plans for Qt that would provide a common toolkit for their massively popular Symbian and new Linux based phones.
Meanwhile, that creative friday xml interface was still being worked on. It got canceled a few times and also revived a few. That eventually evolved into QML, and QtQuick.
Then came N9 and MeeGo, which was going to use this new fangled dynamic UI. MeeGo was also open source, and it's community version was called Mer and Nemo. Yes, there are parts of Qtopia in MeeGo.
The rest of the story is famous, or rather, infamous now. Nokia made redundant the people working on MeeGo. Later on, all of us Brisbane developers, QA and others were also made redundant. The rest of what I call the Trolltech entity got sold to Digia. The QA server room was packed up and shipped to Digia, who is doing a fantastic job of getting Qt Everywhere!
A few of those guys that were working on MeeGo got together and created a company called Jolla, and created a Linux based mobile OS based on Mer named Sailfish. Yes, there are a few Trolltech Trolls working for Jolla. and yes, there are parts of Qtopia in Sailfish.
Saturday, October 27, 2012
motion sensor gestures
It's been quite a bit of time since I blogged about anything. No longer able to post to the official Qt Labs blog, so I will post here, and maybe it will get picked up to a wider audience.
It's been about 60 days since my last day at the Nokia office In Brisbane, Australia. My days are now full of house duties, kids, recording music, and looking for appropriate workage.
Blatant self promotion
I have been trying to keep my chops up, taking a short contract doing some desktopy work with Qt. But also keeping up with the Mer and Nemo projects.
We have been working on refactoring the Qt 5 QSensor qml API, removing the old qt-mobility stuff and merging the two imports.
As well, I will, in the near future be adding a QFreeFall sensor that detects when a device is freefalling, and a Wii controller sensor plugin to drive the normal motion QSensors and well as some of the QSensorGestures.
I have done the easily possible, and back ported QSensorGesture and friends to Qt 4, so projects such as Mer/Nemo/Jolla, as well as the Blackberry 10 projects could use some cool sensor gestures API.
When most people think of gesture recognition, they think of the touch sensor. Within Qt, this would be the QGesture classes. They also think about using the image sensor to decipher gestures through a computer vision API such as openCV.
and although I would like to extend QSensorGesture to include the openCV and touch sensors techniques, this is really about existing device motion gestures.
Things such as the obvious gesture of 'shake' - when you shake your phone/tablet, your audio playlist gets randomized. But it can be extended to other gestures as well.
QSensors include the qtsensors gesture recognition plugin, that includes such gestures as whip, shake, pickup, twist, cover, hover, turnover and slam.
http://doc-snapshot.qt-project.org/5.0/sensorgesture-plugins-topics.html#recognizer-plugins
The above url shows about how to perform these gestures.
These are simple ad-hock gesture recognizers, and do not verge into the more robust and technically challenging HMM realm of recognizers.
Nor is it currently possible for a user to create their own gestures and use them. I'd planned on doing this at my day job, but someone thought it better I needed to take my own time doing them. These are still on my todo list.
Of course, the backport isn't in the official Qt Mobility repo until becomes a part of the qt-project, but I believe that is only a matter of time and resources.
In my next blog, I will demonstrate the use of motion sensor gestures and the advantages that they might bring to a mobile UX.
It's been about 60 days since my last day at the Nokia office In Brisbane, Australia. My days are now full of house duties, kids, recording music, and looking for appropriate workage.
Blatant self promotion
I have been trying to keep my chops up, taking a short contract doing some desktopy work with Qt. But also keeping up with the Mer and Nemo projects.
We have been working on refactoring the Qt 5 QSensor qml API, removing the old qt-mobility stuff and merging the two imports.
As well, I will, in the near future be adding a QFreeFall sensor that detects when a device is freefalling, and a Wii controller sensor plugin to drive the normal motion QSensors and well as some of the QSensorGestures.
I have done the easily possible, and back ported QSensorGesture and friends to Qt 4, so projects such as Mer/Nemo/Jolla, as well as the Blackberry 10 projects could use some cool sensor gestures API.
When most people think of gesture recognition, they think of the touch sensor. Within Qt, this would be the QGesture classes. They also think about using the image sensor to decipher gestures through a computer vision API such as openCV.
and although I would like to extend QSensorGesture to include the openCV and touch sensors techniques, this is really about existing device motion gestures.
Things such as the obvious gesture of 'shake' - when you shake your phone/tablet, your audio playlist gets randomized. But it can be extended to other gestures as well.
QSensors include the qtsensors gesture recognition plugin, that includes such gestures as whip, shake, pickup, twist, cover, hover, turnover and slam.
http://doc-snapshot.qt-project.org/5.0/sensorgesture-plugins-topics.html#recognizer-plugins
The above url shows about how to perform these gestures.
These are simple ad-hock gesture recognizers, and do not verge into the more robust and technically challenging HMM realm of recognizers.
Nor is it currently possible for a user to create their own gestures and use them. I'd planned on doing this at my day job, but someone thought it better I needed to take my own time doing them. These are still on my todo list.
Of course, the backport isn't in the official Qt Mobility repo until becomes a part of the qt-project, but I believe that is only a matter of time and resources.
In my next blog, I will demonstrate the use of motion sensor gestures and the advantages that they might bring to a mobile UX.
Subscribe to:
Posts (Atom)