Qt Application Development

From ESS-WIKI
Revision as of 09:14, 28 September 2016 by Zhengguang.yang (talk | contribs) (Setup Environment in gui mode)
Jump to: navigation, search

We have two ways to build a Qt project: the command line mode and the gui mode. We have a description as follow:

Setup Environment in command line mode

If you want to build C, C++, Qt and other linux application, there is a magical script to use. It’s environment-setup in the $(BSP_ROOT)/cross_compiler/linux-devkit directory. To build some linux application, you just need to excute this script as follow, and then everything will be ok.

$ cd  $(BSP_ROOT)/cross_compiler/linux-devkit> 
$ source  environment-setup

After this, you can buid Qt project. For example, we have a calculator qt demo to build as follow:

$  cd  $(demo)/calculator
$  ls 
button.cpp  button.h  calculator.cpp  calculator.h  calculator.pro  main.cpp
$  qmake calculator.pro   ## Generating a makefile
$  make  	## If no error, a binary will be generated after make.

Setup Environment in gui mode

Qt Creator is a cross-platform IDE that makes application and UI development a breeze. Since time-to-market is key, the IDE includes productivity tools that speed up your development time. Before your qt developement in gui mode, a qtcreator is essential. You can download it at this link https://www.qt.io/download/. The Installation package qt-unified-linux-x64-2.0.3-1-online.run is recommended, because we have tested it on ubuntu14.04 and some previous version of qtcreator installer has some bugs on using gdb debugging.

Then, there are some steps to setup your developement environment as follow: