pyqt QlistWidget 自定义设计一(静态设计)

这篇博客展示了如何在PyQT中对QlistWidget进行静态设计,提供了实现效果的截图,并给出了使用qtpy库(兼容PyQt5和PyQt4)的代码示例。
摘要由CSDN通过智能技术生成

效果图如下

QlistWidget复杂功能设计

代码如下:

from qtpy.QtWidgets import (QWidget, QLabel, QApplication, QPushButton, QVBoxLayout, 
                            QHBoxLayout, QListWidget, QListWidgetItem)

from qtpy.QtCore import QSize, Qt
from qtpy.QtGui import QPixmap, QFont
import sys

class MyLable(QWidget):
    """ a widget contains a picture and two line of text """
    def __init__(self, title, subtitle, icon_path):
        """
        :param title: str title
        :param subtitle: str subtitle
        :param icon_path: path of picture
        """
        super(MyLable, self).__init__()
        self.lb_title = QLabel(title)
        self.lb_title.setFont(QFont("Arial", 10, QFont.Bold))
        self.lb_subtitle 
  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值