일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
- essay
- hbase
- Artificial Intelligence
- leadership
- Software Engineering
- MySQL
- history
- Italy
- programming_book
- comic agile
- web
- django
- management
- Book review
- ubuntu
- Book
- agile
- Malaysia
- Spain
- hadoop
- RFID
- France
- Java
- QT
- Kuala Lumpur
- Python
- erlang
- Linux
- Programming
- program
- Today
- Total
목록Programming (347)
Laying Out Widgets In this section, we will create a small example application that demonstrates how to use layouts to manage the geometry of widgets in a window and how to use signals and slots to synchronize two widgets. The application asks for the user's age, which the user can enter by manipulating either a spin box or a slider. 이 부분에서, 우리는 윈도우에서 위젯의 위치 구조를 관리할 레이아웃을 어떻게 사용하고 두 개의 위젯을 동기화시키..
Making Connections The second example shows how to respond to user actions. The application consists of a button that the user can click to quit. The source code is very similar to Hello, except that we are using a QPushButton instead of a QLabel as our main widget, and we are connecting a user action (clicking a button) to a piece of code. 두 번째 예제는 사용자의 동작에 어떻게 반응하는지 보여줄 것이다. 어플리케이션은 사용자가 종료를 위..
Hello Qt Let's start with a very simple Qt program. We will first study it line by line, then we will see how to compile and run it. 매우 간단한 Qt 프로그램을 시작하자. 우리는 우선 행별로 공부하고, 그 다음에 어떻게 컴파일하고 실행하는지 볼 것이다. 1 #include 2 #include 3 int main(int argc, char *argv[]) 4 { 5 QApplication app(argc, argv); 6 QLabel *label = new QLabel("Hello Qt!"); 7 label->show(); 8 return app.exec(); 9 } Lines 1 and 2 inclu..
Chapter 1. Getting Started Hello Qt Making Connections Laying Out Widgets Using the Reference Documentation This chapter shows how to combine basic C++ with the functionality provided by Qt to create a few small graphical user interface (GUI) applications. This chapter also introduces two key Qt ideas: "signals and slots" and layouts. In Chapter 2, we will go into more depth, and in Chapter 3, w..
자료: C++ GUI Programming with Qt 4 전자책(Qt version 4.1.1) 설치버전 및 환경: Qt 4.4.0, MinGw 3.4.5 on Windows XP
download URL: http://trolltech.com/downloads/opensource 사용 버전: Qt Open Source Edition for C++ Developers: Windows Download MinGW가 필요하므로 미리 설치하거나(http://www.mingw.org), 아니면 설치시 옵션 선택을 통해 같이 설치해야 한다 설치 경로에 공백을 허용하지 않아 Program Files에 설치할 수가 없었다(default c:\Qt\4.4.0) 설치 후 환경 변수 설정의 Path 부분에 설치 경로의 bin directory 추가 cmd 창에서 qmake를 입력했을 때 정상 동작을 하면 끝
gcc 3.4.5 (mingw), Windows XP #include // define to get CRC32 value #define POLYNOMIAL_FOR_CRC32 (unsigned long)0xedb88320 // use in function makeCRCTable() #define SIZE_OF_CRC32_TABLE 256 static unsigned long l_ulCRCtable[SIZE_OF_CRC32_TABLE]; #include "crc.h" /** CRC32 를 얻기위한 CRC 테이블을 작성한다(Make CRC table to get CRC32 value). getCRC32() 에 의하여 사용되어지고, 사용자가 직접 사용하지는 않는다 (Called by function getCRC..
gcc 3.4.5 (mingw), Windows XP #include /* reserved C marco __FILE__, __LINE__, __DATE__, __TIME__ */ int main() { printf("file name :\t%s\n", __FILE__); printf("line number :\t%d\n", __LINE__); printf("date :\t%s\n", __DATE__); printf("time :\t%s\n", __TIME__); return 0; }
gcc 3.4.5 (mingw), Windows XP /* 마소 주니어 2004.02 page 28 명령행 인자를 주어 menu를 선택하는 경우 */ #include #include void doHello() { printf("command was HELLO\n"); } void doJiny() { printf("command was JINY\n"); } void doNone() { printf("command was NONE\n"); } void doCmd(const char* p_cpCmd) { if ( strcmp(p_cpCmd, "hello") == 0 ) { doHello(); } else if ( strcmp(p_cpCmd, "jiny") == 0 ) { doJiny(); } else { do..
gcc 3.4.5 (mingw), Windows XP 1. integer 정렬 #include #include int intcompare(const void* p1, const void* p2) { int i = *((int *)p1); int j = *((int *)p2); if ( i > j ) return (1); if ( i < j ) return (-1); return (0); } int main() { int i; int a[10] = { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; size_t nelems = sizeof(a) / sizeof(int); qsort((void *)a, nelems, sizeof(int), intcompare); for ( i = 0; i < nel..