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

PyQt5: QCommandLinkButton

Published by admin at 2022年3月29日
Categories
  • Python
Tags

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_())

发表回复 取消回复

您的电子邮箱地址不会被公开。 必填项已用*标注

Categories

  • 猫
  • Python
  • MySQL
  • Django
  • Html/CSS
  • JavaScript
  • Vue
  • RegExp
  • php
  • Practice
  • Virtualization
  • Linux
  • Windows
  • Android
  • NAS
  • Software
  • Hardware
  • Network
  • Router
  • Office
  • WordPress
  • SEO
  • English
  • Games
  • Recipes
  • living
  • Memorandum
  • Essays
  • 未分类

归档

©2015-2022 Alaica Blog support@alaica.com