window10右下角有一块区域用鼠标点着没反应

打开任务管理器

找到,windows资源管理器---右键重新启动解决

  • 11
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
好的,以下是一个简单的示例代码: ```python from PyQt5 import QtWidgets, QtCore class PopupWindow(QtWidgets.QWidget): def __init__(self, message): super().__init__() self.message = message self.initUI() def initUI(self): self.setGeometry(0, 0, 300, 100) # 设置弹窗大小 self.setWindowTitle('Popup') # 设置弹窗标题 # 弹窗文本标签 label = QtWidgets.QLabel(self.message, self) label.setAlignment(QtCore.Qt.AlignCenter) label.setStyleSheet("font-size: 16px;") # 关闭弹窗按钮 close_button = QtWidgets.QPushButton('Close', self) close_button.setStyleSheet("font-size: 12px;") close_button.clicked.connect(self.close) # 窗口布局 layout = QtWidgets.QVBoxLayout(self) layout.addWidget(label) layout.addWidget(close_button) self.setLayout(layout) # 设置窗口显示位置 desktop = QtWidgets.QApplication.desktop() screen_rect = desktop.screenGeometry() x = screen_rect.width() - self.width() - 10 # 右下角 y = screen_rect.height() - self.height() - 10 # 右下角 self.move(x, y) # 设置动画效果 self.animation = QtCore.QPropertyAnimation(self, b"windowOpacity") self.animation.finished.connect(self.close) self.animation.setDuration(2000) # 持续2秒 self.animation.setStartValue(0.0) self.animation.setEndValue(1.0) self.animation.start() self.show() if __name__ == '__main__': app = QtWidgets.QApplication([]) message = 'Hello, World!' popup = PopupWindow(message) app.exec_() ``` 这个弹窗类继承自 `QWidget`,使用了 PyQt5 的布局和动画效果。你可以根据自己的需要修改弹窗大小、文本内容、持续时间等属性。在 `__main__` 函数中创建一个 `PopupWindow` 实例即可显示弹窗。
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值