摘要: 在计算机应用程序中,对话框是用户与应用程序交互的窗口。对话框用于输入数据,修改数据,修改应用程序设置等。 import sys from PyQt5.QtWidgets import QApplication, QWidget, QGridLayout, QPushButton, QLabel, Q 阅读全文
posted @ 2020-01-17 17:17 PIPO2 阅读(882) 评论(0) 推荐(0) 编辑
摘要: 复选框被选中或者取消选中,都会发射一个stateChanged()信号。可以使用 isChecked()来查询复选框是否被选中。 import sys from PyQt5.QtWidgets import QApplication, QWidget, QCheckBox, QLabel, QHBo 阅读全文
posted @ 2020-01-17 16:12 PIPO2 阅读(11683) 评论(0) 推荐(1) 编辑
摘要: QRadioButton是一个单选按钮,可以打开(选中)或关闭(取消选中)。在一组单选按钮中,一次只能选中其中一个按钮。 打开或关闭按钮,都会发出toggled()信号。使用isChecked()可以查看是否选择了一个特定的按钮。 import sys from PyQt5.QtWidgets im 阅读全文
posted @ 2020-01-17 15:21 PIPO2 阅读(2234) 评论(0) 推荐(0) 编辑
摘要: 普通按钮(QPushButton) import sys from PyQt5.QtWidgets import QApplication, QWidget, QPushButton from PyQt5.QtCore import QTimer class Example(QWidget): de 阅读全文
posted @ 2020-01-17 14:23 PIPO2 阅读(1261) 评论(1) 推荐(0) 编辑
摘要: 箱式布局(BoxLayout) 我们使用QHBoxLayout和QVBoxLayout,来分别创建水平布局和垂直布局。 import sys from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QHBoxLayout, QV 阅读全文
posted @ 2020-01-17 10:50 PIPO2 阅读(231) 评论(0) 推荐(0) 编辑