随笔分类 - qt
摘要:1 封装自定义按钮 myPushBttton 2 构造函数 (默认图片,按下后显示图片) 3 测试开始按钮 4 开始制作特效 5 zoom1 向下弹跳 6 zoom2 向上弹跳 代码如下 main.h #ifndef MAINMAIN_H #define MAINMAIN_H #include <Q
阅读全文
摘要:QFile 对文件进行读写操作 1 QFile 进行读写操纵 2 QFile file(pah ) 文件路径 3 读 file.open(打开方式) file.readAll(). file.readLine(); atEnd() 默认读取上utf8 利用编码格式类 指定读取格式 QTextCode
阅读全文
摘要:QPaintDevice 绘图设备 1 QPixmap QImage Qbitmap(黑白色) QPicture QWidget 2 QPixmap 对不同平台做了显示优化 fill(填充颜色) QPainter paintere(&pic) 画家往设备上画 画完保存 save("路径") 3 QI
阅读全文
摘要:Qpainter 绘图 1 绘图事件 void paintEvent(QPaintEvent *event) 2 声明一个画家对象 QPainter painter(this) this 指定绘图设备 3 画线 圆 矩形 文字等 4 设置画笔 QPen 设置画笔宽度,风格 5 设置画刷 QBrush
阅读全文