树莓派中安装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. 关于java项目与web项目中lib包的那点事

    一.在java项目中如何引入外部jar包:1.在我们的java项目下新建一个lib文件夹:2.将我们需要引入的jat包复制到lib文件夹下:3.选中我们lib包下的jar,右键选择Build Path ...

  2. 【MySQL案例】error.log的Warning:If a crash happens thisconfiguration does not guarantee that the relay lo

    1.1.1. If a crash happens thisconfiguration does not guarantee that the relay log info will be consi ...

  3. vue router 传递参数

    vue-router 传参的方式 query 和params query 类似于get请求的传参方法 就是 ? 这种形式的 https://i.cnblogs.com/EditPosts.aspx?o ...

  4. Clustering Devices In An Internet Of Things

    Clustering devices in an Internet of Things ('IoT'), including: receiving, by a device clustering mo ...

  5. P和P1指向了O和O1两个变量(对象)的地址, 而不是O和O1的内容(对象的实际地址)——充分证明@是取变量(对象)的地址,而不是变量里面的内容,够清楚!

    如图,为什么这样取出来的p,p1的值不一样呢?   165232328群友庾伟洪告诉我:  P和P1指向了O和O1两个变量(对象)的地址, 而不是O和O1的内容(对象的实际地址) ,你想P指向真正的对 ...

  6. WPF中取得预定义颜色

    原文:WPF中取得预定义颜色 使用XAML代码取得.net预定义颜色:<Page    xmlns="http://schemas.microsoft.com/winfx/2006/x ...

  7. 简明Python3教程 15.异常

    简介 当程序发生意外情况时则产生异常. 例如你需要读一个文件而这个文件并不存在会咋样?又或者是程序运行时你把它误删除了呢? 上述情形通过异常进行处理. 类似的,如果你的程序存在一些非法语句会发生什么呢 ...

  8. python下载图片(2)

    #-*- coding: UTF-8 -*- import urllib2, re,datetime,time, os,sys from PIL import Image, ImageDraw, Im ...

  9. ASP.NET Core 设置和初始化数据库 - ASP.NET Core 基础教程 - 简单教程,简单编程

    原文:ASP.NET Core 设置和初始化数据库 - ASP.NET Core 基础教程 - 简单教程,简单编程 ASP.NET Core 设置和初始化数据库 上一章节中我们已经设置和配置好了 EF ...

  10. GTK+浅谈之一Windows10下QtCreator中GTK+环境搭建(十几篇)

    一.简介 虽然GTK+是Linux下的开发环境,因为其跨平台特性,有时候需要在Windows上用到它的.如下是在Windows10下配置GTK+的开发环境.        Gnome的开发基础结构是围 ...