Version 1 (modified by 5 years ago) (diff) | ,
---|
Mycroft Mark II - GUI using Qt 5.12 LTS
Build QT 5.12 LTS for eglfs
Install and compile Qt 5.12 LTS using this excellent guide: https://www.tal.org/tutorials/building-qt-512-raspberry-pi.
Prerequisites
I did add 1GB swap and set the GPU memory to 16MB while building which worked without problem and took about 10 hours.
Download and build
The following steps are from that guide and is only here so that it does not get lost.
- wget http://download.qt.io/official_releases/qt/5.12/5.12.7/single/qt-everywhere-src-5.12.7.tar.xz
- tar xf qt-everywhere-src-5.12.7.tar.xz
- git clone https://github.com/oniongarlic/qt-raspberrypi-configuration.git
- cd qt-raspberrypi-configuration && make install DESTDIR=../qt-everywhere-src-5.12.7
- apt-get update
- apt-get install build-essential libfontconfig1-dev libdbus-1-dev libfreetype6-dev libicu-dev libinput-dev libxkbcommon-dev libsqlite3-dev libssl-dev libpng-dev libjpeg-dev libglib2.0-dev libraspberrypi-dev
- mkdir build
- cd build
then this command:
PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/share/pkgconfig \ ../qt-everywhere-src-5.12.7/configure -platform linux-rpi-g++ \ -v \ -opengl es2 -eglfs \ -no-gtk \ -opensource -confirm-license -release \ -reduce-exports \ -force-pkg-config \ -nomake examples -no-compile-examples \ -skip qtwayland \ -skip qtwebengine \ -no-feature-geoservices_mapboxgl \ -qt-pcre \ -no-pch \ -ssl \ -evdev \ -system-freetype \ -fontconfig \ -glib \ -prefix /opt/Qt5.12 \ -qpa eglfs
- make -j2
- make install
This results in the complete build in /opt/Qt5.12
Building Kirigami
This is based on a combination of the official KDE guide to build the KDE framework at https://community.kde.org/Get_Involved/development#Set_up_kdesrc-build and this comprehensive guide at https://jbbgameich.github.io/misc/2019/05/25/kdesrc-build-custom-qt.html As above these are the pure commands:
- mkdir -p ~/kde/src
- cd ~/kde/src/
- git clone https://anongit.kde.org/kdesrc-build.git && cd kdesrc-build
- ./kdesrc-build --initial-setup
- source ~/.bashrc
- nano ~/.kdesrc-buildrc
change the qtdir so that it points to the Qt5.12 installation and comment the qt5-build-include and custom-qt5-libs-build-include
# qtdir ~/kde/qt5 # Where to find Qt5 qtdir /opt/Qt5.12 ... # Qt and some Qt-using middleware libraries # include /home/pi/kde/src/kdesrc-build/qt5-build-include # include /home/pi/kde/src/kdesrc-build/custom-qt5-libs-build-include
- kdesrc-build kirigami --include-dependencies
Test Kirigami
Use the exmaple from https://api.kde.org/frameworks/kirigami/html/classorg_1_1kde_1_1kirigami_1_1ApplicationWindow.html (also attached) and try to run it.
- mkdir -p ~/ws_qt/kirigami
- cd ~/ws_qt/kirigami
either edit the file and paste the content
- nano main.qml
or download the attachement
Attachments (1)
-
main.qml (2.8 KB) - added by 5 years ago.
Kirigami example
Download all attachments as: .zip