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

  1. Add your own Qt project in the example directory.

  2. Edit the gui.pro file in the example directory.

  3. Assuming that the project directory is named double_panel_demo, add SUBDIRS += double_panel_demo to the gui.pro file.

  4. qmake && make.

(7)Running effect

_images/double_panel.jpg