How to use Qt Lite with Yocto
November 30, 2018 by Kari Oikarinen | Comments
During the development cycle of 5.12 we've been working on making it easier to use Qt Lite in Yocto builds, especially those using our meta-boot2qt layer.
Qt Configuration Tool now has the ability to export the set of selected Qt Lite features into files that can be used by the Yocto build to build a slimmer Qt.
Qt Configuration Tool is commercial-only and allows you visually explore and toggle different optional parts of Qt after opening an initially configured source tree. It can be used directly to configure that source tree for builds that don't include features that you don't need. That configuration can also be exported into a single file that can imported later, which makes sharing the configuration between people easier.
Previously there however wasn't a clear path to using that in a Yocto-driven build, since meta-qt5 recipes build Qt module by module. New version 1.2 of the tool and the new qt5-features class in meta-boot2qt layer provide that. Both are available in Qt for Device Creation 5.12.
./configurefor a qt5 source tree with the necessary options for your
platform and choosing the commercial license.
- Open Qt Configuration Tool and select the build directory from the previous step.
- Select/unselect the features you want with the tool.
- When the configuration is ready, select "File" > "Export Features for
Boot2Qt" and pick a folder. A feature file for each module that you've made
changes to is created into that folder.
- In your yocto build, for each module that you have a feature file for:
- Create a new recipe extension for the module, e.g. "qtdeclarative_git.bbappend".
- Add the line "
inherit qt5-features" into that bbappend file.
- Put the feature file for the module (e.g. "qtdeclarative.opt") into a
features/directory next to your bbappend file.
Then run your build (
bitbake b2qt-embedded-qt5-image if you are basing your build on our example images) and enjoy the slimmer Qt made just for you!
Subscribe to our newsletter
Try Qt 6.4 Now!
Download the latest release here: www.qt.io/download.
Qt 6 is the productivity platform for the future, with next-gen 2D & 3D UX and limitless scalability.
Explore Qt World
Check our Qt demos and case studies in the virtual Qt World
Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.
Näytä tämä julkaisu Instagramissa.
Want to build something for tomorrow, join #QtPeople today! We have loads of cool jobs you don't want to miss! http://qt.io/careers #builtwithQt #software #developers #coding #framework #tool #tooling #C++ #QML #engineers #sales #tech #technology #UI #UX #CX #Qt #Qtdev #global #openpositions #careers #job
Henkilön Qt (@theqtcompany) jakama julkaisu