本文将结合章节和问题发现的先后顺序来编排,具体是酱紫的:每个章节单列出来作为本文的一节,在该节下按时间顺序列出发现的问题。
第4章
1). 51页第六行:“ iconName 属性定图标的名字”,其中“定图标的名字”,应该为“指定图标的名字”
第5章
1). 62页,5.2.2 节,“第一个字符必须是字母、下画线”,其中的“下画线”应为“下划线”
2).第80页,5.5.5节,“Math 有下列方法:”,这句话被误作为符号列表印刷了。
3).第102页,application.platform ,应为 Qt.platform
4).第67页,5.3.5节,第四行、第五行,isFinit 应为 isFinite 。
第8章
1). 第154页,8.1.2 节,“Colomun”应为“Column”
第9章
1). 第174页,9.4 节,“RaidoButton”应为“RadioButton”
第11章
1). 11.3.3节,259页,代码:
void ImageProcessor::process(QString file, ImageAlgorithm algorithm) { m_d->process(file, algorithm); }
应该是:
void ImageProcessor::process(QString file, ImageAlgorithm algorithm) { QUrl url(file); m_d->process(url.toLocalFile(), algorithm); }
书上印刷的源码是错的,源码链接里给出的源码是正确的。
2). 236页的ColorMaker实例,用的QQuickView。程序运行起来后点quit按钮不能退出。会报错:
Signal QQmlEngine::quit() emitted, but no receivers connected to handle it.
需要在 main.cpp 中 main() 函数内 “QQuickView viewer;” 之后添加下面的代码:
QObject::connect(viewer.engine(), SIGNAL(quit()), &app, SLOT(quit()))
包括 240 页的代码,也需要添加上面代码。
——转载于https://blog.csdn.net/foruok/article/details/42000777
来源:https://www.cnblogs.com/mxydsg8858/p/12291739.html