User Tools

Site Tools


tutorials:common:development:qt_set_up_on_cubieboard

This is an old revision of the document!


Qt Set Up On Cubieboard

About this Article

Abstract

Install

1.install qtcreator

sudo apt-get install qtcreator

2.download QT lib from http://qt-project.org/downloads, in this guide use below

3. install lib

 sudo apt-get install mesa-common-dev  freeglut3 freeglut3-dev libqglviewer-dev-common

4. configure QT lib

mkdir -p /usr/local/qt/
./configure -no-pch -opengl --prefix=/usr/local/qt/

5. compile and install

make
make install

The compile process will use several hours,please be patient.

After compiled ,enter examples/widgets/wiggly/,there is some sample code you can use .Like below

CALCULATOR

TETRIS

6.set up the environment variables

add two line in the end of file /etc/profile

PATH="$PATH:/usr/local/qt/bin"
export PATH

programme hello world

1.build a directory named hello ,create a new file named hello.cpp in it .

#include <QApplication>
#include <QLabel>
int main (int argc, char *argv [])
{
QApplication app (argc, argv);
QLabel *label = new QLabel ("Hello Qt!");
label->show ();
return app. exec ();
}

2. compile the hello.cpp

qmake -project
qmake
make

In current directory create a executable file,run it as like below

Headline

See Also

tutorials/common/development/qt_set_up_on_cubieboard.1405156063.txt.gz · Last modified: 2014/07/12 17:07 by allen