当前位置:网站首页>迅为i.MX6ULL开发板Qt系统移植-交叉编译Qt代码
迅为i.MX6ULL开发板Qt系统移植-交叉编译Qt代码
2022-07-27 23:07:00 【mucheni】
步骤一:
给 QT 程序布局,然后在构造函数添加自动设置屏幕大小的代码。代码如下:
设置好了以后把 qt 代码拷贝到 Ubuntu 上。
#include <QDesktopWidget>
#include <QStyle>
#include <QRect>
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);
添加完成如下图所示:

步骤二:
进入要编译的工程文件夹目录,直接使用我们在 Ubuntu 上编译好的 qt 源码下的 qmake 生成 Makefile,
输入:/opt/qt5.7.0/bin/qmake

步骤三:
成功生成 Makefile 以后,直接使用 make 编译就可以,编译成功以后得到的可执行文件就可以在开发板上运行。


边栏推荐
- Starfish Os打造的元宇宙生态,跟MetaBell的合作只是开始
- In April, global smartphone shipments fell 41% year-on-year, and Huawei surpassed Samsung to become the world's first for the first time
- Realize ABCD letter increment
- 站在数字零售转型的十字路口,我们需要用新的角度来看待它
- Understanding of cap
- Swoole内存-table详解
- System clock failure of database fault tolerance
- Oxygen temperature and humidity module
- BSP video tutorial issue 21: easy one key implementation of serial port DMA variable length transceiver, support bare metal and RTOS, including MDK and IAR, which is more convenient than stm32cubemx (
- JS global function method module exports exports
猜你喜欢

Un7.13: how to add, delete, modify and query in vs Code?

Codeforces暑期训练周报(7.14~7.20)

Focus loss explanation

How the test architects of bat factories interpret various disputes of the test platform

字节月薪28K,分享一波我的自动化测试经验....

彻底搞懂kubernetes调度框架与插件

测试人员需要了解的软件流程

Go 语言变量

HarmonyOS 3正式发布:鸿蒙手机流畅安全,鸿蒙终端常用常新

Swoole定时器
随机推荐
Detailed explanation of retinanet network structure
Gazebo 控制实例
闻泰科技收购安世半导体剩余股权获得无条件通过
C language main function transfer parameters
BAT大厂测试架构师如何解读测试平台的各种争议
Swoole定时器
华为回应美国封锁供应链:他们仍需为5G专利付费
Shenzhen Huaqiang announced that it plans to invest no more than 20million yuan in BYD semiconductor
MySQL进阶--存储过程以及自定义函数
BigDecimal common API
《安富莱嵌入式周报》第275期:2022.07.18--2022.07.24
彻底搞懂kubernetes调度框架与插件
ABAP CDS Table Function介绍与示例
Use of postman
【游戏】任天堂Nintendo Switch超详细购买/使用指南以及注意事项(根据自己使用持续更新中...)
Anfulai embedded weekly report no. 275: 2022.07.18--2022.07.24
Safety detection risk
Insider of container network hard core technology (7) sailing on the sea depends on the helmsman
线性代数 【23】 概念的深入01 - Points坐标点和Vectors向量
Gossip: an initially perfect FS is as impractical as the first version of the program requiring no bugs