Qt 平常遇到之后自己搜索一些东西的集合(1)

来源:互联网 发布:软件实施过程 编辑:程序博客网 时间:2024/05/16 09:15

1:Qt中载入和保存二进制的方法一般是实例化一个QFile (click here) 然后通过QDataStream对象存储就好了 

2:QDataStream 提供了一种平台无关的存储格式 支持老多老多数据类型 QList<t> QMap<K,T> c++ int double QByteArray QFont QImage QPixmap QString QVariant等

3:qPrintable(QString ) 宏将一个QString 对象返回一个const char *;

4:Qt支持标准C++的文件流读写 不过标准C++要注意文件的编码格式

5:Q_PROPERTY宏 很类似于Objective-c里面的@property 宏里面也是成员的定义  (click here)

6:QDialog 有三种对话框 模式 (用来阻塞其它对话框的操作,用exec()来执行)非模式 和半模式  (show()来执行)


信号和槽很清晰明了的机制


widget 以及widget子类中geometry()属性 Rect topleft size 

This property holds the geometry of the widget relative to its parent and excluding the window frame. (qt文档解释的geometry属性)

原创粉丝点击