Skip to main content

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

Qtica

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

Learn More About

Qtica Get Start

import os
import sys
from PySide6.QtCore import QSize
from Qtica import BehaviorDeclarative, Api
from Qtica.tools import Alignment
from Qtica.utils.colors import get_random_color, get_hex_from_color
from Qtica.widgets import (
  MainWindow,
  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",
      methods = [
        ("resize", QSize(400, 200))
      ],
      events = [
        ("mousePressEvent", lambda event: self.update_background())
      ],
      home=Alignment(
          child=Label(
            uid="label",
            text=f"Hello {os.environ.get('USER', '')}, Welcome to Qtica!",
            qss={"font-size": "24px"}
          )
        ),
      qss={"background-color": get_hex_from_color(*get_random_color())},
      )

app = Application(
  arg=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 tools
  • tools.Icon
  • utils.color.DetectImageColors, using to get an image colors map.
  • utils.color.get_image_average_color, get an image rgb color
  • widgets.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 to ObjectBase
  • utils.color.get_hex_from_color color arg to *rgb arg

Fixed

  • pixmap error when you try to add QIcon to tools.Icon with color value.

0.1.4 (2023-11-24)

Added

  • extras icons modules elusive feather fluent fontawesome material
  • widgets.FramelessWindowSizeGrip edge option.
  • utils.methods.qt_corner_to_edge convert Qt.Corner inputs to Qt.Edge values.
  • widgets.StackedWidget QStackedWidget built-in PySide6 class
  • widgets.IconWidget
  • widgets.MaskDialog

Fixed

  • widgets.FramelessWindow window geometry changed when move window.
  • widgets.FramelessWindowSizeGrip cursor shape for SizeGrip hover.
  • tools.Icon list index out of range, when used colored icon

Updated

  • widgets.NavBarButton it's now subclass from core.WidgetBase

0.2.0 (2023-12-08)

Added

  • widgets.HLine, Horizontal Frame widget.
  • widgets.VLine, Vertical Frame widget.
  • widgets.ToolButton PySide6 Built-in QToolButton
  • core.QStyleSheet restore_qss method to restore last Qss value after update_qss call with save=False.
  • tools.StatusEdgePaint corner option.
  • widgets.MainWindow, widgets.FramelessWindow, widgets.RoutingWindow sys_tray parameter.
  • widgets.Menu, fork for PySide6.QtWidgets.QMenu.
  • tools.Action fork for PySide6.QtGui.QAction.
  • utils.colors
  • core.AbstractBase methods parameter.
  • core.AbstractTool, core.ToolBase
  • core.AbstractIcon, core.IconBase
  • core.AbstractPainter, core.PainterBase

Removed

  • tools.Painter __init__ return parent widget, you can now return from subclasses.
  • core.Return, we dont't need it any more!

Updated

  • layouts.HLayout, and layouts.VLayout now you can add QSpacerItem, and QLayoutItem widget types to children
  • core.QStyleSheet improve Qss Parser.
  • core.QStyleSheet qss now accepting json files.
  • widgets.LineEdit password_mode parameter, add password echo mode support
  • widgets.SlidingStackedWidget now children parameter support Route

Fixed

  • tools.Icon default color value -1, when color is None
  • core.Api.fetch method NoneType error when fetching PySide6.QtWidgets.QApplication class type.

Changed

  • tools.PaintStatusEdge to tools.StatusEdgePaint
  • tools.ObjectBase to tools.QObjectBase
  • widgets.QuickWidget parameter file to qml
  • widgets.QuickView parameter file to qml

0.2.1 (2023-12-09)

Added

  • utils.caseconverter, forking caseconverter module to be as built-in

Changed

  • moving pynput from dependencies to extras dependence.

Removed

  • requirements.txt, we don't need it anymore, you can use poetry to install requirements.

Project details


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.2.1.tar.gz (356.8 kB view details)

Uploaded Source

Built Distribution

qtica-0.2.1-py3-none-any.whl (175.0 kB view details)

Uploaded Python 3

File details

Details for the file qtica-0.2.1.tar.gz.

File metadata

  • Download URL: qtica-0.2.1.tar.gz
  • Upload date:
  • Size: 356.8 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

Hashes for qtica-0.2.1.tar.gz
Algorithm Hash digest
SHA256 8fbb94d3afc97b895d234451af907624cb86a0ca53744fd1ffc9228156ba5ab5
MD5 b6d6a51a35c7cee8f06a78c3f95bfd80
BLAKE2b-256 6b30ffae7737a55555050c0d2d31381f51d1f1af99772c3fc59ba9fe0225fc56

See more details on using hashes here.

File details

Details for the file qtica-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: qtica-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 175.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

Hashes for qtica-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ed23e7c4cdb0f3f6aff192cb0c0392042eb4ae14d6fb719c7cd3b22e3c4fca38
MD5 40ba3715681f27f48d81e3d344a8a198
BLAKE2b-256 d172b79c7e99d900c0a4dccbcd0289ca896c2dd3d2f54d10c5a5108bfe22cbcd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page