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:32]
allen [Install]
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 48: Line 48:
 After compiled ,enter ''​examples/​widgets/​wiggly/'',​there is some sample code you can use .Like below After compiled ,enter ''​examples/​widgets/​wiggly/'',​there is some sample code you can use .Like below
  
-HELLO WORLD  
- 
-{{ :​tutorials:​common:​2.png |}} 
  
 CALCULATOR CALCULATOR
-{{ :​tutorials:​common:​3.png |}}  
  
 +{{:​tutorials:​common:​3.png?​300|}}
  
 +TETRIS
  
-==== Headline ====+{{:​tutorials:​common:​6.png?​300|}}
  
 +6.set up the environment variables ​
  
-===== Headline ​=====+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
  
-=== See Also ===+  
 +{{:​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.1405153971.txt.gz · Last modified: 2014/07/12 16:32 by allen