chapter 1 getting started
第一章 开始qt之旅程 【程序编程相关:也谈中外程序员的差别】 【推荐阅读:关于二十四点游戏的编程思路与基本算法】 【扩展信息:[原创]:2004末的彩蛋,FlashV】this chapter shows how to combine basic c++ with the functionality provided by qt to create a few small graphical user intferface (gui) application.
本章将展示在c++中如何使用qt提供的功能来创建一些简单的用户图形界面(gui)应用程序. this chapter also introduces two key qt ideas:"signals and slots" and loyouts.in chapter 2,we will go into more depth,and in chapter 3,we will start building a realistic application. 本章还要介绍qt里两个重要的概念:"信号与信号槽" 与布局(译:在窗体上).在第二章,还要对这个两个概念进行更深入的讨论.在第三章就开始建立真正的应用程序了. here´s a very simple qt program: 这里是一个非常简单的qt程序 1 #inclue <qapplication.h> 2 #inclue <qlabel.h>3 int main(int argc,char * argv[])
4 { 5 qapplication app(argc,argv); 6 qlabel *label = new qlabel("hellow qt!", 0); 7 app.setmainwidget(label); 8 label->show(); 9 return app.exec(); 10 } we will first study it line by line, then we will see how to compile and run it. 我们首先一行一行的学习,然后再看看如何去编译与执行他. lines 1 and 2 include the definitions of the qapplication and qlabel classes. 第一与第二行包含定义qapplication 与qlabel的头文件.... 下一页