pyqt4文档阅读(7.2):QRect

本文详细介绍了PyQt4中的QRect类,包括其属性、方法、特殊方法和主要功能。QRect是一个用于描述矩形的结构体,包含四个整数表示左上角坐标和宽高。文章强调了坐标系统的特性和初始化方式,并提醒开发者注意某些函数的历史遗留问题,建议仅使用与左上角坐标和宽高相关的函数。
摘要由CSDN通过智能技术生成

本系列文章长期更新修改.


QRect,相当于QPoint+QSize,但拥有更丰富的函数和操作,本质上是4个int的结构体.


属性:

Methods

  • __init__ (self)
  • __init__ (self, int aleft, int atop, int awidth, int aheight)
  • __init__ (self, QPoint atopLeft, QPoint abottomRight)
  • __init__ (self, QPoint atopLeft, QSize asize)
  • __init__ (self, QRect other)
  • adjust (self, int dx1, int dy1, int dx2, int dy2)
  • QRect adjusted (self, int xp1, int yp1, int xp2, int yp2)
  • int bottom (self)
  • QPoint bottomLeft (self)
  • QPoint bottomRight (self)
  • QPoint center (self)
  • bool contains (self, QPoint p, bool proper = False)
  • bool contains (self, QRect r, bool proper = False)
  • bool contains (self, int ax, int ay, bool aproper)
  • bool contains (self, int ax, int ay)
  • (int xp1, int yp1, int xp2, int yp2) getCoords (self)
  • (int ax, int ay, int aw, int ah) getRect (self)
  • int height (self)
  • QRect intersect (self, QRect r)
  • QRect intersected (self, QRect other)
  • bool intersects (self, QRect r)
  • bool isEmpty (self)
  • bool isNull (self)
  • bool isValid (self)
  • int left (self)
  • moveBottom (self, int pos)
  • moveBottomLeft (self, QPoint p)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值