# PyQt5按钮样式 **Repository Path**: luokai-dandan/py-qt5-button-style ## Basic Information - **Project Name**: PyQt5按钮样式 - **Description**: 使用QSS修改按钮样式,背景图、鼠标放上改变、点击改变等。 - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-11-21 - **Last Updated**: 2023-11-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: Python, Qt ## README # PyQt5按钮样式 #### 介绍 使用QSS修改按钮样式,背景图、鼠标放上改变、点击改变等。 #### 软件架构 软件架构说明 #### 安装教程 ```shell pip install PyQt5 pip install pyqt5-tools ``` #### 使用说明 ​ 使用Everything搜索designer.exe文件打开ui后缀文件。 #### QSS样式 ```css QPushButton{ background-origin: content; border-image:url(:/play2.png)0 0 0 0; border-width:0px 0px 0px 0px; background-repeat: no-repeat; text-decoration: none; font-size: 16px; font-family: 微软雅黑,宋体, Arial, Helvetica, Verdana, sans-serif; font-weight: bold; border-radius: 3px; } QPushButton:hover{ border-image: url(:/play1.png); } QPushButton:pressed{ border-image: url(:/play3.png); } ```