Install Qt in Raspberry Pi
Blog link:Http://blog.csdn.net/jdh99, Author: jdh, reprinted please note.
Environment:
HOST: win7
Hardware: Raspberry Pi
Steps:
Reference: 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 wocould be less heavy for the PI to download separately.
- Sudo Apt-Get install qt4-Dev-Tools
Then I went for Qt creator
- Sudo Apt-Get install qtcreator
I also installed
-
- Sudo Apt-Get install gcc
- Sudo Apt-Get install xterm
-
- Sudo Apt-Get install git-Core
- Sudo Apt-Get install Subversion
This gives as a Result QT creator 2.5 with QT 4.8.1 32 bit
If the problem occurs: e: unable to locate package QT creator, enter the following command to update
Sudo apt-Get Update & sudo apt-Get upgrade
If the problem persists, trySudo Apt-Get installQtcreator
Run qtcreator:
In this case, you also need to add the compilation chain: 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.
After configuration, try to run a simpleProgram, The effect is as follows:
Running successful! However, compilation is very slow. It is estimated that the official development still needs to be developed on the PC before porting.