首先感谢 译者 为大家提供这么一本好书 ^_^
但上周看本书第九章时,发觉有些地方翻译似乎有点小问题。故一并列出,和大家共同探讨。
(希望对下次重印时有些帮助)
page 166
QThreadPool::globalInstance()方法会向Qt的全局对象 QThreadPool 返回一个指针,
The QThreadPool::globalInstance() method returns a pointer to Qt’s global QThreadPool object,
Page 214
这个模型子类用 QAbstractItemModel::data() 方法取代了 Qt::DisplayRole,以保证...
This model subclass simply replaces the QAbstractItemModel::data() method for the Qt::DisplayRole and ensures that...
注解:是子类中的实现取代或覆盖 QAbstractItemModel::data()吧 ?
Page 222
这个连接保证了无论何时光标被移除(无论是通过键盘还是鼠标),都调用这个槽。
This connection ensures that whenever the cursor is moved (whether by keyboard or mouse), the slot is called.
注解:笔误? “移除” ==> move
page 227
我们还可以使用 QTextEdit 子类化 QPlainTextEdit,它更为便捷,因为它提供了...
We could, of course, subclass QPlainTextEdit, but using QTextEdit is more convenient since it provides many useful slots—such as QTextEdit::setFontItalic()—that are not provided by QPlainTextEdit.
注解:这个?... 怎么解释
page 231
一个可选方法是使用 sender(),以进一步使用SignalMapper;...
An alternative to using sender() is to use a QSignalMapper; that would provide better encapsulation, at the cost of slightly increasing the size of the code.
注解:是替代谁?
page 231
当用户启动上下文菜单(通过右键点击或通过使用一个平台定义的键序列)时将在构造函数中建立一个信号-槽连接,并调用这个槽。
When the user invokes the context menu (by right-clicking or by using a platform-specific key sequence), as a result of a signal–slot connection made in the constructor, this slot is called.
注解:何时建立连接
page 231
最后弹出菜单,使用Menu::exec()把相对窗口部件的位置转换为相对屏幕(也就是全局)的位置。
At the end we pop up the menu, having converted the widget-relative position into the screen-relative (i.e., global) position, used by QMenu::exec().
注解: QMenu::exec() 使用转换以后的全局位置
page 242
这个方法会创建一个QString的HTML,然后...
This method creates a QString of HTML that it then sets on the QTextDocument it is passed.
注解:QString的HTML ?
page 286
如前面所述,使用 dynamic_cast<>()让程序不依赖于RTTI ...
As noted earlier,the use of dynamic_cast<>() makes the application dependent on the availability of RTTI—Run Time Type Information—although there are various ways to avoid this;
注解:多了“不”字
page289
在前面提醒注意的,使用 dynamic_cast<>()使程序不依赖RTTI是否可用,...
As noted earlier, the use of dynamic_cast<>() makes the application dependent on the availability of RTTI, although this can be avoided;
注解:同上