Widgets

all widgets in this library are fork of PySide6 widgets, so you can back to PySide6 documentation to see more info about widgets.

Usage

As you know in PySide6.QtWidgets there are set, get, and add functions, so when you write the name of a function of type set or add in the **kwargs, that function will be executed with the value inserted.

from Qtica.widgets import Widget
from Qtica.utils import Args

Widget(
    setWindowTitle: Args | Any = "Window Title",
    addAction: list[Args | Any] = QAction()
)

to overwrite widget events you can use the events parameter

Widget(
    events=[
        ("Event Name", lambda e: ...)
        # Using enums.Events
        (Events.mousePress, lambda e: ...)
    ]
)

to connect widget signals you can use the signals parameter

to write inline Qt Style Sheet

the long press signal usage

set window attributes

set window flags

run class method

Last updated