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

(3)Run the demo


(4)Demo code directory


(5)Code compilation

cd example

(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