Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:vim3:applications:qt5

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
products:sbc:vim3:applications:qt5 [2022/07/06 23:50]
frank Add QT5
products:sbc:vim3:applications:qt5 [2023/02/05 20:09] (current)
nick
Line 1: Line 1:
-====== QT5 ======+~~tag>VIM3 VIM3L qt5~~ 
 +====== VIM3/3L QT5 ======
  
 ===== Introduction ===== ===== Introduction =====
- 
-This document is mainly QT5 library. You will learn how to install QT5, set it up and test it. 
  
 <WRAP info > <WRAP info >
Line 12: Line 11:
   * Only support Framebuffer Console mode.   * Only support Framebuffer Console mode.
   * Install this version of library will break some official packages which depend on this library.   * Install this version of library will break some official packages which depend on this library.
-  * The QT5 with eglfs Mali GPU (fbdev) only supports Ubuntu 20.04 Linux 4.9+  * The QT5 with eglfs Mali GPU (fbdev) only supports Ubuntu 20.04 Linux 4.9.
 </WRAP> </WRAP>
  
Line 21: Line 20:
 Install QT5 packages. Install QT5 packages.
  
-```sh +```shell 
-sudo apt update +sudo apt update 
-sudo apt install qt5-default qtbase5-examples +sudo apt install qt5-default qtbase5-examples 
-mkdir /tmp/qt5 +mkdir /tmp/qt5 
-cd /tmp/qt5 +cd /tmp/qt5 
-wget https://dl.khadas.com/repos/debs/vim3/focal/qt5/libqt5gui5_5.12.8%2Bdfsg-0ubuntu2_arm64.deb +wget https://dl.khadas.com/repos/debs/vim3/focal/qt5/libqt5gui5_5.12.8%2Bdfsg-0ubuntu2_arm64.deb 
-sudo dpkg -i libqt5gui5_5.12.8+dfsg-0ubuntu2_arm64.deb+sudo dpkg -i libqt5gui5_5.12.8+dfsg-0ubuntu2_arm64.deb
 ``` ```
 ===== Demonstrate ===== ===== Demonstrate =====
Line 34: Line 33:
  
 Setup the environment variables below. Setup the environment variables below.
-```sh +```shell 
-export QT_QPA_PLATFORM=eglfs +export QT_QPA_PLATFORM=eglfs 
-export QT_QPA_EGLFS_INTEGRATION=eglfs_mali+export QT_QPA_EGLFS_INTEGRATION=eglfs_mali
 ``` ```
  
 Run test: Run test:
  
-```sh +```shell 
-/usr/lib/aarch64-linux-gnu/qt5/examples/opengl/qopenglwidget/qopenglwidget+/usr/lib/aarch64-linux-gnu/qt5/examples/opengl/qopenglwidget/qopenglwidget
 ``` ```
  
Line 50: Line 49:
 For more demos, please check ''/usr/lib/aarch64-linux-gnu/qt5/examples''. For more demos, please check ''/usr/lib/aarch64-linux-gnu/qt5/examples''.
 </WRAP> </WRAP>
 +
 +===== Setup for TS050 Touchscreen (Only for VIM3/VIM3L) =====
 +
 +If you want to run the QT demo on TS050 touchscreen you need to remove the HDMI cable first.
 +
 +The TS050 touchscreen is ''portrait mode'' by default, if you want to use the QT under ''landscape mode'' you need to setup the environment variables below to rotate the screen and touchscreen:
 +
 +
 +<tabbox VIM3>
 +
 +```shell
 +export QT_QPA_EGLFS_ROTATION=90
 +export QT_QPA_EGLFS_DISABLE_INPUT=1
 +export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event3:rotate=90
 +export QT_QPA_GENERIC_PLUGINS=evdevtouch:/dev/input/event3
 +```
 +
 +<tabbox VIM3L>
 +
 +```shell
 +export QT_QPA_EGLFS_ROTATION=90
 +export QT_QPA_EGLFS_DISABLE_INPUT=1
 +export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event4:rotate=90
 +export QT_QPA_GENERIC_PLUGINS=evdevtouch:/dev/input/event4
 +```
 +</tabbox>
 +
 +For other orientation rotation, you can change them yourself.
 +
  
 ===== Troubleshooting ===== ===== Troubleshooting =====
  
 When you install such version of library you will break some packages (such as qtcreator) which depend on the original library, if you don’t want to break the packages you can follow the instructions below to install the original QT5 library. When you install such version of library you will break some packages (such as qtcreator) which depend on the original library, if you don’t want to break the packages you can follow the instructions below to install the original QT5 library.
-```sh + 
-wget http://ports.ubuntu.com/pool/universe/q/qtbase-opensource-src/libqt5gui5_5.12.8+dfsg-0ubuntu1_arm64.deb +```shell 
-sudo dpkg -i libqt5gui5_5.12.8+dfsg-0ubuntu1_arm64.deb+wget http://ports.ubuntu.com/pool/universe/q/qtbase-opensource-src/libqt5gui5_5.12.8+dfsg-0ubuntu1_arm64.deb 
 +sudo dpkg -i libqt5gui5_5.12.8+dfsg-0ubuntu1_arm64.deb
 ``` ```
 ===== See Also ===== ===== See Also =====
Last modified: 2022/07/06 23:50 by frank