【Qt】总结一下Qt的3D开发

关于本篇文章,小生来聊一聊Qt的3D开发。现如今Qt在各行各业都有运用,就目前Qt对3D的支持来看,主要往Qt Quick方向转了。基于qml语言的开发方式可能上手Qt开发要容易一些。从QtCreator提供的示例代码来看,Qt官方大多以Quick为主。对于开发者来说,Qt Quick似乎更受青睐,哈哈。

从官网的资料文档来看,C++和QML类型的资料都差不多,就拿C++来说,关于3D的有如下图所示的模块:
在这里插入图片描述

Quick相关的资料:
在这里插入图片描述

Qt 3D支持以下平台:
在这里插入图片描述


示例工程:
在这里插入图片描述


在这里插入图片描述
从上图可见,目前C++代码示例工程的主要有两个,而Quick框架的工程示例更多。基于Qt的软件开发方式,官方倾向于使用Quick作为软件界面的设计和开发了吧,C++代码作为逻辑驱动。结合Qt Designer Studio3D Studio等IDE能够做出华丽炫酷的软件界面,何等妙哉!性能暂且不论,毕竟性能与优化方案相关。

3D模块链接


搜索关注【嵌入式小生】wx公众号可获取更多精彩内容。
请添加图片描述

交叉编译 Qt 5.14.2 源码,需要先安装交叉编译工具链和对应的库文件,然后使用 Qt 的 configure 工具进行配置,最后进行编译。 以下是一个简单的步骤: 1. 安装交叉编译工具链和库文件,例如 arm-linux-gnueabihf-gcc 和 libssl-dev。可以参考交叉编译工具链的文档或者咨询厂商的技术支持。 2. 下载 Qt 5.14.2 源码包,解压后进入源码目录。 3. 配置 Qt 的编译选项,使用 configure 工具。可以使用以下命令: ``` ./configure -prefix /opt/qt5 \ -release -opensource -confirm-license \ -no-icu -no-opengl -no-xcb -no-glib -no-pulseaudio \ -no-feature-bearermanagement -no-feature-ftp \ -no-feature-socks5 -no-feature-xmlstream -no-feature-xml \ -no-feature-qml-debug -no-feature-process -no-feature-sharedmemory \ -no-feature-animation -no-feature-printer -no-feature-qml-network \ -no-feature-qml -no-feature-qml-debug -no-feature-qml-designer \ -no-feature-qml-filesystem -no-feature-qml-debugger -no-feature-qml-workerscript \ -no-feature-qml-xmlhttprequest -no-feature-qml-workercontext \ -no-feature-qml-websockets -no-feature-qml-webchannel \ -no-feature-qml-mirroring -no-feature-qml-live-reload \ -no-feature-qml-context2d \ -opensource -confirm-license \ -no-sql-sqlite -no-sql-sqlite2 -no-sql-odbc -no-sql-psql \ -no-sql-mysql -no-sql-ibase -no-sql-tds -no-sql-tds \ -no-ssl -no-openssl \ -no-feature-geoservices -no-feature-geoservices-mapboxgl \ -no-feature-geoservices-nokia -no-feature-geoservices-google \ -no-feature-geoservices-here -no-feature-geoservices-mapbox \ -no-feature-geoservices-osm \ -no-feature-testlib \ -no-qml-debug \ -no-widgets \ -no-gui \ -no-iconv \ -no-compile-examples \ -no-cups \ -no-dbus \ -no-fontconfig \ -no-freetype \ -no-harfbuzz \ -no-journald \ -no-kms \ -no-linuxfb \ -no-mirclient \ -no-mtdev \ -no-pcre \ -no-pulseaudio \ -no-rpath \ -no-sm \ -no-syslog \ -no-tslib \ -no-xcb-xinput \ -no-xkbcommon \ -no-xinerama \ -no-xinput \ -no-xkb \ -no-xcursor \ -no-xfixes \ -no-xrandr \ -no-xrender \ -no-xshape \ -no-xsync \ -no-xvideo \ -no-zlib \ -no-eglfs \ -no-gbm \ -no-directfb \ -no-linuxfb \ -no-mirclient \ -no-wayland \ -no-icu \ -no-opengl \ -no-glib \ -platform linux-g++-32 \ -xplatform linux-arm-gnueabi-g++ \ -device-option CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- \ -device-option SYSROOT=/path/to/sysroot ``` 其中,-prefix 指定 Qt 的安装路径,-xplatform 指定交叉编译的平台,-device-option 指定交叉编译工具链的前缀和 sysroot 路径。 4. 执行 make 命令进行编译。 5. 执行 make install 命令进行安装。 完成以上步骤后,就能在指定的安装路径下找到交叉编译后的 Qt 库和工具了。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

iriczhao

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值