Qtica is a Python library that provides a lightweight API around native PySide6, allowing for lightning-fast GUI prototyping using modern declarative UI techniques entirely within Python.
Project description
A Fast Way to Done Your Idea!
Qtica is a Python library that provides a lightweight API around native PySide6, allowing for lightning-fast GUI prototyping using modern declarative UI techniques entirely within Python.
Documention
Qtica Get Start
#!/usr/bin/python3
import os
import sys
from PySide6.QtCore import QSize
from Qtica import BehaviorDeclarative, Api
from Qtica.tools import Alignment, Color
from Qtica.utils.color import get_random_color, get_hex_from_color
from Qtica.widgets import (
MainWindow,
Container,
Label,
Application
)
class Window(BehaviorDeclarative):
def update_background(self):
bg_color = get_hex_from_color(*get_random_color())
fg_color = get_hex_from_color(*get_random_color())
Api.fetch("window").qss.update({"background-color": bg_color})
Api.fetch("label").qss.update({"color": fg_color})
def __init__(self):
return MainWindow(
uid="window",
windowTitle="Qtica Get Start",
resize = QSize(400, 200),
events = [("mousePressEvent", lambda event: self.update_background())],
qss={"background-color": get_hex_from_color(*get_random_color())},
home=Alignment(
child=Label(
uid="label",
text=f"Hello {os.environ.get('USER', '')}, Welcome to Qtica!",
qss={"font-size": "24px"}
)
)
)
app = Application(sys.argv)
window = Window()
window.show()
sys.exit(app.exec())
Changelog
Unreleased - (Soon!)
Added
- parent_child_widgets.py example
0.1.1 - (2023-11-05)
Added
-
PySide6 Built-in Widgets
- QApplication
- QPushButton
- QLabel
- QFrame
- QMainWindow
- QSystemTrayIcon
- QGraphicsView
- QWidget
- QQuickWidget
- QQuickView
- QGraphicsOpacityEffect
- QGraphicsDropShadowEffect
- QGraphicsColorizeEffect
- QGraphicsBlurEffect
- QFormLayout
- QGridLayout
- QHBoxLayout
- QStackedLayout
- QVBoxLayout
-
PySide6 Additional Widgets
- WigglyWidget
- WaterRippleProgressBar
- WaterProgressBar
- ProgressIndicator
- MovieView
- MetroCircleProgress
- ElidingLabel
- FramelessWindow
- RoutingWindow
- TeachingTip
- SlidingStackedWidget
- SideBarWidget
- TerminalWidget
- NavBarWidget
- SilentTextDialog
- LargTextDialog
- ColourfulProgressBar
- OutsideNeumorphismEffect
- InsideNeumorphismEffect
- FlowLayout
- ExpandLayout
-
PySide6 Built-in Core
- QPropertyAnimation
-
PySide6 Additional Core
- StyleAnimation
- ProgressStyleAnimation
- Animation
0.1.2 - (2023-11-07)
Added
- Qtica
logo.png
- version_generator.py example
- status_edge.py example
- resources, and fonts into the
Application
class. tools.Painter class
tools.PaintStatusEdge
widgets.FramelessWindowSizeGrip
Changed
enums.Sizes.size_hint
->enums.Sizes.hint
Fixed
core.BehaviorDeclarative
, no uid in__init__
parameters
0.1.3 - (2023-11-12)
Added
widgets.ThemeSwitchButton
enums.AbstractIcons
to make enum icons that work with Qtica toolstools.Icon
utils.color.DetectImageColors
, using to get an image colors map.utils.color.get_image_average_color
, get an image rgb colorwidgets.LineEdit
core.WidgetBase
effect argument.core.AbstractBase
**kwargs, can now accept set value for method.widgets.ScrollArea
- get_start.py example
Changed
Theme.system_theme
to static method type.effects.*
from ObjectDeclarative class type toObjectBase
utils.color.get_hex_from_color
color arg to *rgb arg
Fixed
- pixmap error when you try to add
QIcon
totools.Icon
with color value.
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
qtica-0.1.3.tar.gz
(316.3 kB
view details)
Built Distribution
qtica-0.1.3-py3-none-any.whl
(155.0 kB
view details)
File details
Details for the file qtica-0.1.3.tar.gz
.
File metadata
- Download URL: qtica-0.1.3.tar.gz
- Upload date:
- Size: 316.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.2.0-36-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35200c7bebd0ab7c0026acc84619c83a918d85e8c633df7c9b8433744884eb06 |
|
MD5 | 811253b321517454dab2c6aad4657c34 |
|
BLAKE2b-256 | 3794a868638d41bc892fe8376fe734de51be8b7883e013e1e263e1df8ad8db1e |
File details
Details for the file qtica-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: qtica-0.1.3-py3-none-any.whl
- Upload date:
- Size: 155.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.2.0-36-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ff9829ed1b13b4b91a41d0a342d6ae34fc538846deeddb98f819dfc054b2efe |
|
MD5 | c3d63cf379a5235cf1745fb0fb5230bc |
|
BLAKE2b-256 | 66d56ed31ac1c036b48c6dfe6b31e619cb141518bce23db436ea606211d8d0c1 |