PyQt5: QCommandLinkButtonPyQt5: QCommandLinkButtonPyQt5: QCommandLinkButtonPyQt5: QCommandLinkButton
  • 首页
  • 博客
  • 书签
  • 文件
  • 分析
  • 登录

PyQt5: QCommandLinkButton

发表 admin at 2022年3月29日
类别
  • Python
标签

QCommandLinkButton 继承自 QPushButton ,是Vista 引入的新控件。

一、案例

from PyQt5.Qt import *
import sys

class Window(QWidget):
    def __init__(self):
        super().__init__()
        self.setWindowTitle('QCommandLinkButton-使用')
        self.resize(500, 400)
        self.setup_ui()
    
    def setup_ui(self):
        btn = QCommandLinkButton(self)
        btn.setText('主标题')
        btn.setDescription('按钮描述')
        btn.setIcon(QIcon('xxx.png'))
        
        
if __name__ == '__main__':
    app = QApplication(sys.argv)
    window = Window()
    window.show()
    sys.exit(app.exec_())

发表回复 取消回复

要发表评论,您必须先登录。

类别

  • Cat
  • Python
  • Django
  • Database
  • Html/CSS
  • JavaScript
  • Vue
  • RegExp
  • Maths/AI
  • PHP/Wordpress
  • Practice
  • Linux
  • Windows
  • Android
  • NAS
  • Software
  • Hardware
  • Network
  • SEO
  • English
  • Games
  • Recipes
  • General
  • Memorandum
  • Essays
  • 未分类

归档

©2015-2023 艾丽卡 Blog support@alaica.com
      ajax-loader