2012年5月30日

Qt编码风格 -- 转

摘要: http://developer.qt.nokia.com/wiki/Qt_Coding_Stylehttp://developer.qt.nokia.com/wiki/Writing_Qt_Examples如果它使你的代码看起来不好,你可以打破任何一个规则。缩进采用4个空格空格,不要用TAB!变量每行一个变量尽可能避免短的变量名单字符的变量只在临时变量或循环的计数中使用等到真正需要使用时再定义变量// Wrongint a, b;char *c, *d; // Correctint height;int width;char *nameOfThis;char *nameOfThat;以小写字 阅读全文

posted @ 2012-05-30 15:21 chuncn 阅读(833) 评论(0) 推荐(0) 编辑

导航