====== Qt Set Up On Cubieboard ====== //__About this Article__// * **Author**: allen --- allen@cubietech.com --- 2014/07/12 13:31 * **Copyrights**: [[http://creativecommons.org/licenses/by-sa/3.0/|CC Attribution-Share Alike 3.0 Unported]] * **Contributors**: [[http://cubieboard.org/|Cubieboard Community]] : ... ===== 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 {{:tutorials:common:55.png|}} 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 {{:tutorials:common:3.png?300|}} TETRIS {{:tutorials:common:6.png?300|}} 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 #include 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 {{:tutorials:common:7.png?200|}} {{tag>Cubieboard Cubietruck}}