Qt sass theme getter
Project description
qt-sass-theme-getter
Qt sass theme getter.
Default theme is dark-gray theme, my favorite.
Setup
python -m pip install qt-sass-theme-getter
Included Packages
- qtsass - For convert sass into css
Method Overview
-
setThemeColor(bg_color, widget_color, text_color, hover_color, border_color, select_color, disabled_color, text_widget_color, scroll_handle_color)
- you can set the theme color by yourself. Give 6-digit hex color string such as #FF0000.-
bg_color - background color
-
widget_color - widget color
-
text_color - text color
-
hover_color - certain widgets' color when mouse cursor is hovering
-
border_color - color of widgets' border
-
select_color - selected widgets' color
-
disabled_color - disabled widgets' color
-
text_widget_color - background color of text widget such as
QTextEdit/QTextBrowser
-
scroll_handle_color - horizontal/vertical
QScrollBar
's handle color
-
-
getThemeFiles(output_dir = os.getcwd())
- you can save css files inoutput_dir
which were converted from .scss files included in this package. -
getThemeStyle() -> str
- use it toQMainWindow
,QDialog
. -
getIconButtonStyle() -> str
- use it toQPushButton/QToolButton
which has icon. -
getIconTextButtonStyle() -> str
- use it toQPushButton/QToolButton
. -
getMenuBarStyle() -> str
- use it toQMenuBar
. -
getMainWidgetStyle() -> str
- use it to "top level"QWidget
.
Example
Here's basic usage - get the style code and modify it(such as getThemeStyle() + QLineEdit { ... }), and set it to desired widget.
pyqt-dark-gray-theme/darkGrayTheme.py - return the dark-gray styles using qt-sass-theme-getter pacakge, even though dark-gray is default.
pyqt-style-setter/styleSetter.py - set the style of some widgets
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for qt-sass-theme-getter-0.0.21.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97b464fd7f1869d67039d72c23c1a8c75b04eb2d171503295cb4ef2ca83d4ad8 |
|
MD5 | 068e55ef687400dd19c3d664850a4194 |
|
BLAKE2b-256 | 71e5ece2929eef30ca5509385f9f64b60b5aad867da749696e1f990361b10277 |
Hashes for qt_sass_theme_getter-0.0.21-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b37d4416ddb69d50ec7314624c5bffb9192b1b4c968c877465e4b7abe30b944 |
|
MD5 | 55c526c64bd0b7917e0f11ae669dd571 |
|
BLAKE2b-256 | 30b5eb5a76cb40dba4ef37ea6099404052493022281d0fd5879a9ffd7c512e23 |