06 2020 档案

摘要:#QLabel控件使用 from PyQt5.QtWidgets import QApplication,QLabel,QWidget,QVBoxLayout from PyQt5.QtCore import Qt from PyQt5.QtGui import QPixmap,QPalette i 阅读全文
posted @ 2020-06-18 09:57 Gex 阅读(1998) 评论(0) 推荐(0)
摘要:1、重写closeEvent() def closeEvent(self, event): reply = QtWidgets.QMessageBox.question(self, 'Message', '你确认要退出么?', QtWidgets.QMessageBox.Yes | QtWidget 阅读全文
posted @ 2020-06-16 15:38 Gex 阅读(3725) 评论(0) 推荐(0)
摘要:窗口闪退 from PyQt5.QtWidgets import * import sys class Main(QMainWindow): def __init__(self): super().__init__() self.setWindowTitle("主窗口") button = QPus 阅读全文
posted @ 2020-06-16 15:30 Gex 阅读(4077) 评论(1) 推荐(0)
摘要:今天遇到有人问我哥问题, a = 7.1 sum = a / 1000 print(sum) 输出:0.0070999999999999995 问:不应该是0.0071吗?怎么多了那么多小数位?我虽然知道这是正常情况,但含糊其辞说不清楚,上网差了下原因,以此记录。 其实这不是Python的问题,而是 阅读全文
posted @ 2020-06-02 10:09 Gex 阅读(772) 评论(0) 推荐(0)