摘要: 单行文本输入框(QLineEdit) import sys from PyQt5.QtWidgets import QApplication, QWidget, QLineEdit, QLabel class Example(QWidget): def __init__(self): super() 阅读全文
posted @ 2020-01-16 14:03 PIPO2 阅读(2555) 评论(0) 推荐(0) 编辑
摘要: QMessageBox类提供了一个消息对话框,用于通知用户或询问用户问题并接收答案。 消息对话框分为五种,分别是information,question,warning,critical,abort。 import sys from PyQt5.QtWidgets import QApplicati 阅读全文
posted @ 2020-01-16 10:14 PIPO2 阅读(886) 评论(0) 推荐(0) 编辑
摘要: 所有的GUI程序都是事件驱动的,事件主要由用户触发,也可能是程序触发。 PyQt5有一个独特的signal&slot(信号槽)机制来处理事件。信号槽用于对象间的通信。signal在某一特定事件发生时被触发,slot可以是任何callable对象。当signal触发时会调用与之相连的slot。 通用表 阅读全文
posted @ 2020-01-16 10:11 PIPO2 阅读(263) 评论(0) 推荐(0) 编辑