摘要: 复选框一共有三种状态:全选中、半选中和无选中。若一个父选项的子选项全部为选中状态,则该父选项为全选中;若子选项全部为无选中状态,则该父选项为无选中状态;若子选项既有全选中和无选中状态,则该父选项为半选中状态 setText() 设置复选框的显示文本 isChecked() 检查复选框是否被选中 阅读全文
posted @ 2019-02-09 20:05 天子骄龙 阅读(2718) 评论(0) 推荐(0)
摘要: 继承 QAbstractButton import sys from PyQt5.QtGui import QPixmap from PyQt5.QtWidgets import QApplication, QWidget, QRadioButton, QLabel, QHBoxLayout, QV 阅读全文
posted @ 2019-02-09 16:38 天子骄龙 阅读(613) 评论(0) 推荐(0)
摘要: 继承 QAbstractButton QToolButton是与工具操作相关的按钮,通常和QToolBar搭配使用。QToolButton一般不用来显示文本,而显示图标QIcon 需要 from PyQt5.QtWidgets import QToolButton 请注意不能在QToolButton 阅读全文
posted @ 2019-02-09 14:32 天子骄龙 阅读(8972) 评论(0) 推荐(0)
摘要: 继承 QObject-->QWidget-->QFrame-->QAbstractScrollArea-->QTextEdit QTextEdit类是一个多行文本框控件,可以显示多行文本内容,当文本内容超出控件显示范围时,可以显示水平个垂直滚动条,Qtextedit不仅可以用来显示文本还可以用来显示 阅读全文
posted @ 2019-02-09 11:30 天子骄龙 阅读(7612) 评论(0) 推荐(2)
摘要: 事件: 显示和关闭事件: showEvent(QShowEvent) 控件显示时调用 closeEvent(QCloseEvent) 控件关闭时调用 def closeEvent(self, QCloseEvent): # 窗口关闭函数 QCloseEvent.accept() #接受关闭 QClo 阅读全文
posted @ 2019-02-09 07:30 天子骄龙 阅读(536) 评论(0) 推荐(0)