美文网首页
QLabel,QRadioButton,QCheckBox

QLabel,QRadioButton,QCheckBox

作者: 希望我是摩羯座 | 来源:发表于2018-12-19 21:40 被阅读0次

用来显示文本或者图像

1.setPixmap() 图像  setText() 文本 setMovie() 动画 setNum() 数字 

2.想明确地显示文本格式,请调用setTextFormat(),格式化文本

3.setWordWrap(True) 设置自动换行

4.状态改变调用函数  stateChanged.connect().  ischecked()判断是否被选中,选中true未选中false

setCheckState(Qt.Checked) 设置选中

setTristate(),setCheckState(Qt.PartiallyChecked) 半选

setTristate(False),setCheckState(Qt.Unchecked) 未选中

相关文章

网友评论

      本文标题:QLabel,QRadioButton,QCheckBox

      本文链接:https://www.haomeiwen.com/subject/ocuskqtx.html