wiki:mycroft_mark-2_gui_qt5.11

Version 2 (modified by admin, 2 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.

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:

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

run it (showing additional debug output and adding the kde framwork build to the import path)

  • QT_DEBUG_PLUGINS=1 QML_IMPORT_TRACE=1 QML2_IMPORT_PATH=/home/pi/kde/usr/lib/arm-linux-gnueabihf/qml /opt/Qt5.12/bin/qmlscene ~/ws_qt/kirigami/main.qml

Attachments (1)

Download all attachments as: .zip