1 Star 1 Fork 1

iounce/Python-Cpp-demo

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
style.py 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
iounce 提交于 2023-08-30 21:52 +08:00 . use Python to gen C++ class -- by PySideFrameless
# -*- coding: utf-8 -*-
# widgets style using setStyleSheet
class LabelStyle:
@staticmethod
def get_title():
return 'QLabel{font-size:16px; padding-left:8px}'
@staticmethod
def get_close():
return 'QLabel:hover{background-color:red}'
@staticmethod
def get_default():
return 'QLabel{padding-left:14px; border-radius:6px;border-width:1px;border-color:black;border-style: solid} QLabel:hover{border-width:2px;}'
@staticmethod
def get_theme(color):
return 'QLabel{padding-left:10px; background-color: %s} QLabel:hover{border-width:1px; border-style: solid}' % color
class ButtonStyle:
@staticmethod
def get_close():
return 'QPushButton:hover{background-color:red}'
@staticmethod
def get_more():
return 'QPushButton::menu-indicator{width:0px}'
class MenuStyle:
@staticmethod
def get_more():
return 'QMenu::item{height:20px; width:100px}'
class WidgetStyle:
@staticmethod
def get_border(name):
return 'QWidget#%s{border:1px solid; border-color:#4f5b62}' % name
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/iounce_admin/python-cpp-demo.git
git@gitee.com:iounce_admin/python-cpp-demo.git
iounce_admin
python-cpp-demo
Python-Cpp-demo
master

搜索帮助