5.4 QCommandLinkButton按钮控件
一、QCommandLinkButton按钮控件
QCommandLinkButton按钮控件是PyQt5或者说是Qt后增加的一个控件,使用到的地方不多,但是功能简单
1.代码:
from PyQt5.Qt import *
import sys
app = QApplication(sys.argv)
window = QWidget()
window.setWindowTitle('QCommandLinkButton-命令链接按钮 - PyQt5中文网')
window.resize(600, 450)
window.move(300, 300)
btn2 = QCommandLinkButton('标题', '描述', window)
##与QBushButton同用方法
# btn2.setText('标题标题标题')
# btn2.setDescription('描述描述描述描述描述描述')
btn2.setIcon(QIcon('aaa.png'))
# QCommandLinkButton中的信号完全使用的是父类QPushbutton的
window.show()
sys.exit(app.exec_())
2.使用效果


浙公网安备 33010602011771号