linux에서 qt 개발 환경 설치

linux 환경: ubuntu 10.4.2
현재 최신 버전은 4.80입니다.
가다ftp://ftp.qt.nokia.com/qt/source/qt 원본 다운로드: qt-everywhere-opensource-src-4.7.4.tar.gz
압축 해제:
tar zvxf qt-everywhere-opensource-src-4.7.4.tar.gz

압축 풀기 디렉토리로 들어가기
cd qt-everywhere-opensource-src-4.7.4

설치된 도움말 파일 보기
cat INSTALL

안에 x11 플랫폼의 설치 링크가 있습니다.http://qt.nokia.com/doc/4.7/install-x11.html, 이 링크에 들어가면 모든 설치 강좌가 있습니다.
X11을 설치한 라이브러리가 없으면 중간에 컴파일하는 데 오류가 발생할 수 있음을 주의하십시오
설치가 완료되면 간단한 Hell, 월드를 써서 테스트해 보세요.
  1 #include <QApplication>
  2 #include <QtGui/QLabel>
  3 #include <QString>
  4 
  5 int main(int argc, char *argv[])
  6 {
  7     QApplication a(argc, argv);
  8 
  9     QString qStr("hello, qt");
 10     QLabel *label = new QLabel(qStr);
 11     label->show();
 12 
 13     return a.exec();
 14 }


qmake -project//생성.pro 프로젝트 파일
qmake//makefile 생성
make
실행./hello,hell,qt
qt에는 경량급 IDE가 하나 더 있습니다. 제가 전에 내린 것은 qt-creator-linux-x86-opensource-2.3.1입니다.bin,./qt-creator-linux-x86-opensource-2.3.1.bin이 실행되면 설치할 수 있으며 설치가 완료되면 새 프로젝트 테스트를 할 수 있습니다.
이로써 qt 개발 환경이 설정되었습니다.

좋은 웹페이지 즐겨찾기