Xun cross-compiles Qt application code for 4412 development board

Step 1:
Layout the QT program, and then add the code to automatically set the screen size in the constructor. The code is as follows: After
setting up, copy the qt code to  Ubuntu  .
#include
#include
#include
QDesktopWidget *deskTopWidget = QApplication::desktop();
QRect deskRect = deskTopWidget->availableGeometry();
int appH = deskRect.height();
int appW = deskRect.width();
this->setFixedSize( appW, appH);
setGeometry(0, 0, appW, appH); The
addition is completed as shown in Figure 62.3.4.1:

Step 2:
Enter the project folder directory to be compiled, and directly use the qt source code that we compiled on Ubuntu Qmake to generate Makefile, enter: /opt/qt5.7.0/bin/qmake Step 3: After the Makefile is successfully generated, you can directly use make to compile, and the executable file obtained after successful compilation can be run on the development board. As shown in the figure, Xun is 4412 development board:







 

Guess you like

Origin blog.csdn.net/mucheni/article/details/115003331