VAR-SOM-MX6 QT Hello World: Difference between revisions

From Variscite Wiki
No edit summary
Line 1: Line 1:
{{PageHeader|VAR-SOM-MX6 - QT5 Hello World}} {{DocImage|category1=VAR-SOM-MX6|category2=Yocto}} __toc__
{{PageHeader|VAR-SOM-MX6 - QT5 Hello World}} {{DocImage|category1=VAR-SOM-MX6|category2=Yocto}} __toc__
= Host installation =
Please follow the QT creator guide: http://variwiki.com/index.php?title=File:YoctoQtCreator.pdf
All development tools will be generated from yocto build and will be compatible with both commercial and open-source QT licenses.<br>
Variscite suggestes reading the below page to have a better understanding of open-source license benefits and obligations:<br>
https://www.qt.io/qt-licensing-terms<br>
Only one requirement: on the host that will be used to cross compile QT applications, you need to install QtCreator.<br>
In order to use QT 5.5, QT creator version must be 3.1.1 or above.<br>
If you are using Ubuntu 15.04 or above, you can just install it from distribution repository via "sudo apt-get install qtcreator".<br>
If you are using Ubuntu 14.10 or below, please execute following instructions:<br>
<pre>
    $ sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
    $ sudo apt-get update
    $ sudo apt-get upgrade
    $ sudo apt-get install qtcreator
</pre>
 
= Build and install tools =
<pre>
$ cd ~/var-som-mx6-yocto-fido/
$ . ./setup-environment build_x11
</pre>
edit local.conf and add to the bottom:
<pre>
#
EXTRA_IMAGE_FEATURES = "debug-tweaks tools-debug eclipse-debug"
</pre>
Build:
<pre>
$ bitbake meta-toolchain-qt5
</pre>
Install:
<pre>
$ tmp/deploy/sdk/poky-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-1.8.sh
Keep the default install directory /opt/poky/1.8
</pre>
 
= sample application =
<pre>
$ cd ~/var-som-mx6-yocto-fido/
$ mkdir qtapps
$ cd qtapps
$ cp -a ../build_x11/tmp/work/cortexa9hf-vfp-neon-mx6qdl-poky-linux-gnueabi/qtbase/5.4.2+gitAUTOINC+2cb17c1fb9-r0/git/examples/opengl/hellowindow/ ./
$ cd hellowindow
$ source /opt/poky/1.8/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
</pre>
 
Build the QT application:
<pre>
$ qmake
$ make clean
$ make
</pre>
<pre>
copy the hellowindow to your target and run it
export DISPLAY=:0.0
./hellowindow --platform xcb
</pre>

Revision as of 08:31, 10 May 2016

VAR-SOM-MX6 - QT5 Hello World

Please follow the QT creator guide: http://variwiki.com/index.php?title=File:YoctoQtCreator.pdf