C++ GUI Programming with Qt4 (三)

Chapter 4 Implementing Application Functionality

The central area of a QMainWindow can be occupied by any kind of widget. Here’s an overview of the possibilities:

  • 1.Use a standard Qt Widget.
  • 2.Use a custom widget.
  • 3.Use a plain QWidget with a layout manager.
  • 4.Use a splitter.
  • 5.Use an MDI area.

QDataStream supports basic C++ types as well as many of Qt’s types. The syntax is modeled after the Standard C++ classes. For example,

out << x << y << z;

writes the variables x,y,and z to a stream,and

in >> x >> y >> z;

reads them from a stream. Because the C++ primitive integer types may have different sizes on different platforms, it is safest to cast these values to one of qint8, quint8, qint16, quint16, qint32, quint32,qint64, and quint64, which are guaranteed to be of the size they advertise (in bits).

QDataStream uses the most recent version of the binary format (version 9 in Qt 4.3), but it can be set to read older versions. To avoid any compatibility problems if the application is recompiled later using a newer Qt release, we explicitly tell QDataStream to use version 9 irrespective of the version of Qt we are compilingagainst. (QDataStream::Qt_4_3 is a convenience constant that equals 9.)

C++ GUI Qt4编程(第二版)》一书所有源代码下载地址:http://download.csdn.net/source/3402597。 《C++ GUI Qt4编程(第二版)》,英文名《C++ GUI Programming with Qt4,Second Edition》,作者:【加拿大】Jasmin Blanchette、【英】Mark Summerfield,翻译:闫锋欣、曾泉人、张志强,审校:周莉娜、赵延兵,出版社:电子工业出版社,ISBN:9787121070389,PDF 格式,大小 155Mb。被压缩为 3 部分,本资源是第二部分:第一部分下载地址:http://download.csdn.net/source/3397783;第二部分下载地址:http://download.csdn.net/source/3397770;第部分下载地址:http://download.csdn.net/source/3397766。 个资源在一起解压缩后(windows 平台下解压缩)即可得到《C++ GUI Qt4编程(第二版)》.pdf 一书。 内容简介: 本书详细讲述了用最新的qt版本进行图形用户界面应用程序开发的各个方面。前5章主要涉及qt基础知识,后两个部分主要讲解qt的中高级编程,包括布局管理、事件处理、二维/维图形、拖放、项视图类、容器类、输入/输出、数据库、多线程、网络、xml、国际化、嵌入式编程等内容。对于本书讲授的大量qt4编程原理和实践,都可以轻易将其应用于qt4.4、qt4.5以及后续版本的qt程序开发过程中。   本书适合对qt编程感兴趣的程序员以及广大计算机编程爱好者阅读,也可作为相关机构的培训教材。 目录: 第一部分 qt基础  第1章 qt入门                   第2章 创建对话框           第3章 创建主窗口                  第4章 实现应用程序的功能        第5章 创建自定义窗口部件      第二部分 qt中级  第6章 布局管理  第7章 事件处理  第8章 二维图形  第9章 拖放  第10章 项视图类  第11章 容器类  第12章 输入与输出  第13章 数据库  第14章 多线程  第15章 网络  第16章 xml  第17章 提供在线帮助 第部分 qt高级 . 第18章 国际经  第19章 自定义外观  第20章 维图形  第21章 创建插件  第22章 应用程序脚本  第23章 平台相关特性  第24章 嵌入性编程第四部分  附录
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值