User Tools

Site Tools


tutorials:common:development:qt_set_up_on_cubieboard

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tutorials:common:development:qt_set_up_on_cubieboard [2014/07/12 16:09]
allen
tutorials:common:development:qt_set_up_on_cubieboard [2014/07/12 17:08] (current)
allen
Line 20: Line 20:
  
 2.download QT lib  from http://​qt-project.org/​downloads,​ in this  guide use below 2.download QT lib  from http://​qt-project.org/​downloads,​ in this  guide use below
- 
  
 {{:​tutorials:​common:​55.png|}} {{:​tutorials:​common:​55.png|}}
 +
  
  
Line 44: Line 44:
 make install ​ make install ​
 </​code>​ </​code>​
-==== Headline ====+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
  
-===== Headline ===== 
  
-=== See Also ===+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''​ 
 + 
 +<​code>​ 
 +PATH="​$PATH:/​usr/​local/​qt/​bin"​ 
 +export PATH 
 +</​code>​ 
 + 
 +===== programme hello world  ===== 
 +1.build a directory named hello ,create a new file named  hello.cpp in it . 
 + 
 +<​code>​ 
 +#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 (); 
 +
 +</​code>​ 
 + 
 +2. compile the hello.cpp 
 + 
 +<​code>​ 
 +qmake -project 
 +qmake 
 +make 
 +</​code>​ 
 +In current directory create a executable file,run it as like below 
 + 
 +  
 +{{:​tutorials:​common:​7.png?​200|}}
  
 <WRAP noprint> <WRAP noprint>
 {{tag>​Cubieboard Cubietruck}} {{tag>​Cubieboard Cubietruck}}
 </​WRAP>​ </​WRAP>​
tutorials/common/development/qt_set_up_on_cubieboard.txt · Last modified: 2014/07/12 17:08 by allen