rock1411的个人主页

http://www.qtcn.org/bbs/u/137197  [收藏] [复制]

rock1411

  • 0

    关注

  • 0

    粉丝

  • 3

    访客

  • 等级:新手上路
  • 总积分:2
  • 保密,1971-01-01

最后登录:2019-09-12

更多资料

日志

2014-08-28 05:36

Qt5 C++源码中使用中文的简单步骤|
转自:http://www.qtcn.org/bbs/read-htm-tid-54663.html
本文不讲任何道理,当你在Qt5的C++源文件内使用中文时,你只需按顺序简单照做即可。(不止是中文,其实你完全可以在代码中使用日韩法俄语等等各国语言)
0. [通用] 源文件保存为带BOM的UTF-8格式
如果你准备跨平台,保存为带BOM的UTF-8是必不可少的。而后,源码中的所有字符串常量使用 QStringLiteral 宏进行包裹
复制代码
QString s1 = QStringLiteral("中国");edit.setText(QStringLiteral("中国"));

仅仅这样就可以了。
..

阅读全文»分类:默认分类|回复:0|浏览:1256
2012-10-20 10:19

The QModelIndex class is used to locate data in a data model.The index is used by item views, delegates, and selectionmodels to locate an item in the model.
Aselection model belonging to one view can be obtained using the view's selectionModel() function, and sharedbetween many views with setSelectionModel(),so the construction of new selection models is generally not required.
weconstruct an instance of a custom table model with 32 items in total, and opena table view onto its data. The tab ..

阅读全文»分类:默认分类|回复:0|浏览:4184

Powered by phpwind v8.7 Certificate Copyright Time now is:05-19 09:23
©2005-2016 QTCN开发网 版权所有 Gzip disabled