树莓派中安装QT

本文博客链接:http://blog.csdn.net/jdh99,作者:jdh,转载请注明.

环境:

主机:WIN7

硬件:树莓派

步骤:

参考链接:http://qt-project.org/wiki/apt-get_Qt4_on_the_Raspberry_Pi

Firstly I got the development tools needed by Qt Creator in the hope it would be less heavy for the Pi to download separately.

  1. sudo apt-get install qt4-dev-tools

Then I went for Qt Creator

  1. sudo apt-get install Qtcreator

I also installed

  1. sudo apt-get install gcc
  2. sudo apt-get install xterm
  3. sudo apt-get install git-core
  4. sudo apt-get install subversion

this gives as a result Qt Creator 2.5 with Qt 4.8.1 32 bit

如果出现问题:e: unable to locate package qt creator,则输入以下命令更新

sudo apt-get update && sudo apt-get upgrade

如果还是有问题,尝试sudo apt-get install qtcreator

成功后可以运行qtcreator:
此时还需要添加编译链:

Problem : no toolchain.

We can only compile for remote embedded devices and this is not the case here, because we are on the Pi and not remotely accessing it.

I added a gcc toolchain

Options > build & run > tab tool chain > button add
Choose GCC

  • Then set compiler path : /usr/bin/arm-linux-gnueabihf-gcc-4.6
  • Debugger : /usr/bin/gdb
  • Mkspec : default

Qt Creator seems to detect that we are going to deploy on a remote target.

To fix this :

  • Go to menu help > about plugins
  • Uncheck device support > remote linux
  • Restart Qt Creator
  • Go to tools > options TAB > build & run > Qt versions > add “/usr/bin/qmake-qt4”

It will then show up as a desktop project in the project wizard instead of embedded.

配置好之后,尝试运行一个简单的程序,效果如下:
运行成功!不过编译很缓慢,正式开发估计还是得在PC上开发好之后再进行移植.

http://blog.csdn.net/jdh99/article/details/8738890

树莓派中安装QT的更多相关文章

  1. [转]Visual Studio 2010 中安装Qt 5.1

    截至目前(2013年7月12日)为止,Qt 的最高版本为Qt5.1,在该版本中已经将Qt Creator与Qt Lib集成在一个文件夹中,因此安装的时候较为方便,只需安装一个即可.因为Qt具有超强的可 ...

  2. 树莓派中安装ubuntu及相关设置

    一.下载并烧录系统 首先准备好我们要烧录的ubuntu_meta系统,可以在树莓派官网中下载https://www.raspberrypi.org/downloads/ 这里我们选择 Raspberr ...

  3. pyqt助手中安装Qt帮助文档

    一.个人安装环境 1.Windows7x64_SP1 2.anaconda2.5.0 + python2.7(anaconda集成,不需单独安装) 3.pyinstaller3.0 4.通过Anaco ...

  4. 树莓派编译安装 EMQ 服务器

    前言 EMQ 是一款开源的物联网 MQTT 消息服务器,使用 Erlang/OTP 语言平台设计,在 DIY 智能家居时可以作为网关,前几天摸索了一下在树莓派中安装 EMQ 的方法,记录一下. 步骤 ...

  5. 4、树莓派的中文:安装ftp,安装gcc,安装qt,编译qt程序,运行qt界面程序

    本博文仅作本人操作过程的记录,留作备忘.自强不息 QQ1222698 1.安装FTP:sudo apt-get install vsftpd 2.配置FTP,修改,/etc/vsftpd.conf # ...

  6. 树莓派中QT实现串口通讯

    树莓派中QT实现串口通讯 开发平台为QT 此博客QT使用的为WiringPi驱动 我使用的串口调试助手为 cutecom 先简单说一些开发过程中需要注意的问题 Linux 下设备为 tty ,对应在 ...

  7. 树莓派中QT实现I2C

    树莓派中QT实现I2C 在QT中实现 I2C 使用的驱动为 wiringPi 库的引入 LIBS += -lwiringPi LIBS += -lwiringPiDev 代码实现 widget.h 中 ...

  8. 树莓派中QT实现PWM

    树莓派中QT实现PWM 在QT中实现 PWM 使用的驱动为 wiringPi 之前的博客中已经介绍了 wiringPi , BOARD 管脚, BCM 之间的关系 这次, 就介绍在 wiringPi ...

  9. 【树莓派】在树莓派的Android系统中安装APK应用

    树莓派3 Android TV安装APK应用教程 本文摘自:http://www.mz6.net/news/android/6867.html 树莓派3 Android TV怎样安装软件?对于熟悉AD ...

随机推荐

  1. python request爬取百度贴吧

    import requests import os import shutil import time class PostBarSpider(object): def __init__(self, ...

  2. ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: java.lang.RuntimeException: java.sql.SQLException: The connection property 'zeroDateTimeBehavior' acceptable values are: 'CO

    使用sqoop导入数据时报了如题的异常,异常的提示是 The connection property 'zeroDateTimeBehavior' acceptable values are: 'CO ...

  3. 【24.63%】【codefroces 686D】Kay and Snowflake

    time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standa ...

  4. vue axios拦截器加全局loading

    import axios from 'axios' import util from './util' import {showFullScreenLoading, tryHideFullScreen ...

  5. PAT 1001-1010 题解

    早期部分代码用 Java 实现.由于 PAT 虽然支持各种语言,但只有 C/C++标程来限定时间,许多题目用 Java 读入数据就已经超时,后来转投 C/C++.浏览全部代码:请戳 本文谨代表个人思路 ...

  6. wpf控件开发基础(3) -属性系统(2)

    原文:wpf控件开发基础(3) -属性系统(2) 上篇说明了属性存在的一系列问题. 属性默认值,可以保证属性的有效性. 属性验证有效性,可以对输入的属性进行校验 属性强制回调, 即不管属性有无发生变化 ...

  7. linux awk(good)

    一个用awk处理字符串的例子: #!/bin/bash source="nokia201703148855" preffixStr=$(echo $source |awk '{pr ...

  8. 微信公众平台消息接口开发(26)从Hello2BizUser文本到subscribe事件

    微信公众平台 微信公众平台开发模式 消息接口 企业微信公众平台 Hello2BizUser subscribe 订阅事件 作者:方倍工作室 原文:http://www.cnblogs.com/txw1 ...

  9. 获取当前电脑的cpu使用率、内存使用率

    https://www.cnblogs.com/Chary/p/7771365.html http://www.cnblogs.com/zl1991/p/4679461.html 要关注几个类 Per ...

  10. Linux性能测试 pmap命令

    名称:       pmap - report memory map of a process(查看进程的内存映像信息)用法       pmap [ -x | -d ] [ -q ] pids... ...