- 37
- 0
- 约1.34万字
- 约 17页
- 2017-06-10 发布于河南
- 举报
Qt编程习惯(国外英文资料)
Qt编程习惯(国外英文资料)
Qt programming practice
/wiki/Coding_Conventions
Wd007 XChinux
Trial school: qi liang
C + + feature
Dont use exceptions
Dont use rtti (runtime type recognition; mainly, the typeinfo structure, dynamic or typeid operator, including throwing exceptions, etc.)
The use of the template class is carefully used only when required, not just because you have mastered the method.
Tip: use the compilers automated test capability to determine whether a c + + feature is supported.
The practice of writing the Qt source code
All of the code is only in ASCII (seven characters, if youre not sure, run man ASCII)
Principle: we already have too many new languages and the unrobust systems of utf-8 and Latin1. When you use a system that is more than 127 in a favorite editor, the system breaks down before you can save it.
Low for string: use/NNN (NNN is octal character here, you should input in any system can represent the characters) or use the/XNN (XNN here is hexadecimal characters).
For example:
reference
QString s = QString: : fromUtf8 ( / 213/005 );
For metaphones in documents, or other non-ascii characters, or using qdocs unicode command or using the appropriate macros; Example: use/uuml for u.
All subclasses of QObject must contain a Q_OBJECT macro, even if it does not use a signal or a slot, otherwise the qobject_cast will fail.
S in the connection statement, the parameters in the normalized signals and slots (can see QMetaObject: : normalizedSignature for standardization of information) to make a fast signal/slot traversal. You can also standardize existing code using $QTDIR/util/normalize
Contains the header file
In the common header file, the header file contains the form that is always used:
reference
# include QtCore/q.h
For the Mac OS X system framework, a library prefix such as QtCore is required, which is also very convenient for non-qmake projects
In the source file, it contains a specific header file and contains the usual header files (such as system fi
您可能关注的文档
- fgpa程序(国外英文资料).doc
- Firebird数据库的中文参考资料(国外英文资料).doc
- flac常用命令(国外英文资料).doc
- Flash 有关试题_1(国外英文资料).doc
- flash练习题(国外英文资料).doc
- FLASH考试题(国外英文资料).doc
- Fluent 计算错误汇总(国外英文资料).doc
- FOXPRO常用函数(国外英文资料).doc
- FTP命令参数(国外英文资料).doc
- FANUC_系统部分参数功能目录(国外英文资料).doc
- 2018-2024年中国朱砂安神丸行业市场调查分析报告.docx
- 2025年安阳天龙化学科技有限公司企业信用报告.docx
- 2026年南阳淅川县重点企业引进人才10名备考题库及参考答案详解一套.docx
- 2026年南阳淅川县重点企业引进人才10名备考题库参考答案详解.docx
- 安徽省合肥市普通高中六校联盟2025-2026学年高三上学期期中联考历史试题.docx
- “临终关怀导览员”在青年志愿者中的情绪耗竭预警研究_2026年3月.docx
- 河南省濮阳市第一高级中学2025-2026学年高二上学期第二次质量检测历史试题.docx
- 驾驶专业技术考试题库及答案.doc
- 高三日语基础知识点.doc
- 2025年河北锐鑫津化新能源科技有限公司(企业信用报告).docx
原创力文档

文档评论(0)