用于 Raspberry Pi 的 QtDesigner [英] QtDesigner for Raspberry Pi

查看:48
本文介绍了用于 Raspberry Pi 的 QtDesigner的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 QT Designer 构建 UI.我需要这个 UI 才能在 Raspberry Pi 上运行.我需要做什么才能为 Pi 制作 UI?它是否必须用像 python 这样的特定语言编写,或者我可以用任何语言编写它并在 Pi 上启动它?我对此很陌生,非常感谢您的指导.

I am building a UI with QT Designer. I need this UI to run on a Raspberry Pi. What do I need to do to make the UI for the Pi? Does it have to be written in a specific language like python or can I just write it in whatever and launch it on the Pi? I am new to this and would really appreciate the guidance.

推荐答案

在 Rpi 本身上运行 qt-creator.您可以通过sudo apt-get install qt-creator"安装

To run qt-creator on Rpi itself. You can install it by "sudo apt-get install qt-creator"

它将在 rpi 上安装 qt-creator 和 qt4-base 模块.安装后,您可以在终端上运行qt-creator"以开始设计.如果您使用 qt creator,您将使用拖放进行 UI 设计和 C++ 作为您的背景代码语言.

It will install qt-creator and qt4-base modules on rpi. After installing, you can run "qt-creator" on terminal to get started with design. You will be using drag and drop for UI design and c++ as you background code language if you use qt creator.

然而,由于 Rpi 上可用的 RAM 有限,qt creator 在 Rpi B 上运行非常缓慢.(我不确定 rpi 2,因为它肯定更强大)

However, qt creator runs very slowly on Rpi B due to limited RAM available on Rpi. (I'm not sure about rpi 2 as it is definitely more powerful)

第二种方法是在 rpi 上安装 qt4 基础包,然后在运行 linux 的 PC(可能是 debian 发行版)上开始开发 qt UI 应用程序.由于 raspbian 是 debian 的一种,首先您可以在您的 PC 上测试代码,然后使用这些文件为 rpi 构建代码.

2nd way is to install qt4 base package on rpi and start developing qt UI application on a linux running PC (possibly a debian distro). Since raspbian is a flavor of debian, first you can test code on your pc and then use those files to build code for rpi.

第三种方法是在主机上设置交叉编译器,并在本地机器上成功测试程序后为 rpi 编译二进制文件.

3rd way is to setup cross compiler on your host PC and compile binary for rpi once you test program successfully on native machine.

希望有帮助.

这篇关于用于 Raspberry Pi 的 QtDesigner的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆