Qt 坐标系统
来源:互联网 发布:java怎么给字母排序 编辑:程序博客网 时间:2024/06/03 06:39
1、move 移动位置
/*对于父窗口(主窗口),坐标系统相对于屏幕 * 原点:相对于屏幕左上角 * x:往右递增 * y:往下递增 */ move(100,100); //坐标相对于屏幕 /*子窗口,坐标系统相对于父窗口 * 原点:相对于窗口空白区域左上角(不包括边框) * x:往右递增 * y:往下递增 */ QPushButton *b1= new QPushButton(this); //指定父对象为窗口(this) b1->move(100,100); //坐标相对于窗口 b1->resize(200,100); //设置按钮b1大小 QPushButton *b2= new QPushButton(b1); //指定父对象为按钮b1 b2->move(10,10); //坐标相对于按钮b1
2、translate 偏移坐标系
QPainter painter(this); //>>1 右移一位,相当于width() / 2 painter.translate(width() >> 1,height() >> 1); //通过给定的偏移量转换坐标系统;也就是说,给定的偏移量被加到点上。
3、rotate 旋转坐标系
QPainter painter(this); painter2.rotate(60); //顺时针旋转坐标系。给定的角度参数是度数。
阅读全文
0 0
- Qt 坐标系统
- Qt坐标系统
- Qt 坐标系统 笔记
- Qt 坐标系统 笔记
- Qt 坐标系统
- Qt坐标系统
- Qt坐标系统
- qt坐标系统见解
- qt坐标系统
- QT坐标系统
- QT坐标系统
- QT坐标系统
- QT 坐标系统
- Qt 坐标系统
- QT的坐标系统
- qt坐标系统见解
- QT中的坐标系统
- Qt之坐标系统
- Coursera deep learning 吴恩达 神经网络和深度学习 第四周 编程作业 Building your Deep Neural Network
- Servlet文件上传
- UE4场景太亮
- org.apache.hadoop.hive.serde2.SerDeException: Row is not a valid JSON Object
- ioctl返回-1解决方法
- Qt 坐标系统
- ue4 bp singleton
- Redis高可用方案哨兵机制------ 配置文件sentinel.conf详解
- Mycat使用性能监控管理工具获取相关性能缺陷和监视信息
- python中的注释行和注释块
- 2018医学考博英语阅读理解解题技巧
- 关于移动短信ISMG和SP的开发源码
- 编程中的降龙十八掌
- ext中的fireEvent事件