python qt刷新_Python Qt.SizeFDiagCursor方法代码示例
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import SizeFDiagCursor [as 别名]
def mouseMoveEvent(self, event):
"""鼠标移动事件"""
super(FramelessWindow, self).mouseMoveEvent(event)
pos = event.pos()
xPos, yPos = pos.x(), pos.y()
wm, hm = self.width() - self.Margins, self.height() - self.Margins
if self.isMaximized() or self.isFullScreen():
self.Direction = None
self.setCursor(Qt.ArrowCursor)
return
if event.buttons() == Qt.LeftButton and self._pressed:
self._resizeWidget(pos)
return
if xPos <= self.Margins and yPos <= self.Margins:
# 左上角
self.Direction = LeftTop
self.setCursor(Qt.SizeFDiagCursor)
elif wm <= xPos <= self.width() and hm <= yPos <= self.height():
# 右下角
self.Direction = RightBottom
self.setCursor(Qt.SizeFDiagCursor)
elif wm <= xPos and yPos <= self.Margins:
# 右上角
self.Direction = RightTop
self.setCursor(Qt.SizeBDiagCursor)
elif xPos <= self.Margins and hm <= yPos:
# 左下角
self.Direction = LeftBottom
self.setCursor(Qt.SizeBDiagCursor)
elif 0 <= xPos <= self.Margins and self.Margins <= yPos <= hm:
# 左边
self.Direction = Left
self.setCursor(Qt.SizeHorCursor)
elif wm <= xPos <= self.width() and self.Margins <= yPos <= hm:
# 右边
self.Direction = Right
self.setCursor(Qt.SizeHorCursor)
elif self.Margins <= xPos <= wm and 0 <= yPos <= self.Margins:
# 上面
self.Direction = Top
self.setCursor(Qt.SizeVerCursor)
elif self.Margins <= xPos <= wm and hm <= yPos <= self.height():
# 下面
self.Direction = Bottom
self.setCursor(Qt.SizeVerCursor)
python qt刷新_Python Qt.SizeFDiagCursor方法代码示例相关推荐
- python qt 按钮_Python QtWidgets.QPushButton方法代码示例
本文整理汇总了Python中PySide2.QtWidgets.QPushButton方法的典型用法代码示例.如果您正苦于以下问题:Python QtWidgets.QPushButton方法的具体用 ...
- python html模板_Python html.format_html方法代码示例
本文整理汇总了Python中django.utils.html.format_html方法的典型用法代码示例.如果您正苦于以下问题:Python html.format_html方法的具体用法?Pyt ...
- python session模块_Python backend.set_session方法代码示例
本文整理汇总了Python中keras.backend.set_session方法的典型用法代码示例.如果您正苦于以下问题:Python backend.set_session方法的具体用法?Pyth ...
- python color属性_Python turtle.color方法代码示例
本文整理汇总了Python中turtle.color方法的典型用法代码示例.如果您正苦于以下问题:Python turtle.color方法的具体用法?Python turtle.color怎么用?P ...
- python end用法_Python turtle.end_fill方法代码示例
本文整理汇总了Python中turtle.end_fill方法的典型用法代码示例.如果您正苦于以下问题:Python turtle.end_fill方法的具体用法?Python turtle.end_ ...
- python geometry用法_Python geometry.MultiPolygon方法代码示例
本文整理汇总了Python中shapely.geometry.MultiPolygon方法的典型用法代码示例.如果您正苦于以下问题:Python geometry.MultiPolygon方法的具体用 ...
- python logistic步骤_Python api.Logit方法代码示例
本文整理汇总了Python中statsmodels.api.Logit方法的典型用法代码示例.如果您正苦于以下问题:Python api.Logit方法的具体用法?Python api.Logit怎么 ...
- python iteritems函数_Python six.iteritems方法代码示例
本文整理汇总了Python中sklearn.externals.six.iteritems方法的典型用法代码示例.如果您正苦于以下问题:Python six.iteritems方法的具体用法?Pyth ...
- python gc模块_Python gc.collect方法代码示例
本文整理汇总了Python中gc.collect方法的典型用法代码示例.如果您正苦于以下问题:Python gc.collect方法的具体用法?Python gc.collect怎么用?Python ...
- python fmod函数_Python numpy.fmod方法代码示例
本文整理汇总了Python中numpy.fmod方法的典型用法代码示例.如果您正苦于以下问题:Python numpy.fmod方法的具体用法?Python numpy.fmod怎么用?Python ...
最新文章
- 【周末阅读】2019自动驾驶十大关键词
- [PHP] 访问MySQL
- Python 报错 SyntaxError: invalid syntax 解决方法
- JavaScript权威指南科03章 种类、值和变量(1)
- 二十四、数据挖掘时序模式
- WebServices 基础知识
- Capistrano deploy flow outline
- 本田2022年新车将搭载谷歌Automotive OS
- 【tarjan缩点】受欢迎的牛
- 谷歌云端语音识别服务软件
- 读取JSON文件并 排序,分组,
- 51CTO六周年,我不得不说的话!【我与51CTO的故事】
- 【读书笔记《Android游戏编程之从零开始》】6.Android 游戏开发常用的系统控件(TabHost、ListView)
- stm32呼吸灯c语言程序,STM32 呼吸灯程序请教
- elementUI + echar 实现饼图效果
- openstack虚拟机模板的搭建
- weka的java环境配置_weka环境配置
- 解决DLL load failed while importing _imaging: 找不到指定的模块。问题
- 高仿美团iOS版,版本号5.7
- 追问上交所资金校验缺失系统老化