3. Qt dual screen different display¶
The object is to demonstrate the use of Qt demo application Ubuntu system implementation and operation of dual-screen display.
(1)Into the desktop environment
export XAUTHORITY=/home/firefly/.Xauthority
export DISPLAY=:0
(2)Set environment variables
For the construction of Qt environment, please refer to Qt cross compilation environment support.
export QT_QPA_PLATFORM=xcb
export QT_QPA_EGLFS_INTEGRATION=XCB_EGL
(3)Run the demo
./firefly_arm64_qt5.12.2_18.04/demo/double_panel_demo
(4)Demo code directory
firefly_arm64_qt5.12.2_18.04/example/double_panel_demo
(5)Code compilation
cd example
qmake
make
(6)Add your own Qt project
Add your own Qt project in the
example
directory.Edit the
gui.pro
file in theexample
directory.Assuming that the project directory is named
double_panel_demo
, addSUBDIRS += double_panel_demo
to thegui.pro
file.qmake && make
.
(7)Running effect