Qt5 on Wayland for RPi

单片机编程

友情提示点击顶部放大镜 可以使用站内搜索

2020.8.25 更新:树莓派上 Qt 开发环境的搭建

以下内容需要Raspbian环境。下载并编译Qt-base

设置环境

操作界面设置为CLI,并将用于VideoCore的内存设置为最小:16MB。

获取Qt5源代码

$ git clone git://gitorious.org/qt/qtbase.git
$ git clone git://gitorious.org/qt/qtjsbackend.git
$ git clone git://gitorious.org/qt/qtdeclarative.git
$ git clone git://gitorious.org/qt/qtwayland.git
$ cd qtbase
$ ./configure -opensource -confirm-license -qreal float -fully-process -no-c++11 -nomake tests -nomake examples -make libs -prefix /opt/qt5
$ make && sudo make install
$ cd ../qtjsbackend
$ /opt/qt5/bin/qmake
$ make && make install
$ cd ../qtjsbackend
$ /opt/qt5/bin/qmake
$ make && make install
$ cd ../qtdeclarative
$ /opt/qt5/bin/qmake
$ make && make install
$ cd ../qtwayland
$ /opt/qt5/bin/qmake
$ make && make install

测试一下,需要退出X Windows。

$ cd qtbase/examples/opengl/hellowindow
$ qmake
$ make
$ weston-launch &
$ ./hellowindow -platform waylaid

参考资料:
[1] http://wayland.freedesktop.org/qt5.html

赞(14)
踩(0)
分享
本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除。

目录[+]

取消
微信二维码
微信二维码
支付宝二维码