QtMui Framework Introduction QtMui is a powerful Python framework built on top of PySide6, designed to bring the full power of React and Material-UI (MUI) to desktop application development. Inspired by the component-based architecture and styling flexibility of MUI (https://mui.com), QtMui provides a comprehensive suite of UI components, hooks, state management, and form handling utilities. It enables developers to create modern, responsive, and cross-platform desktop applications with a declarative, React-like API. With official support at https://qtmui.com, QtMui is the go-to solution for building scalable, professional-grade desktop UIs. Features
Comprehensive Component Library: A complete set of Material-UI-inspired components, including Box, Button, TextField, Grid, Typography, and more, designed for flexibility and ease of use. React-Inspired Hooks: Includes hooks like useState, useEffect, useResponsive, and others to manage state, side effects, and responsive layouts in a declarative manner. State Management with Redux: Integrated Redux support for centralized, predictable state management across complex applications. Form Handling and Validation: Robust form management with hookform and formvalidate, enabling seamless form creation and validation. Responsive Design: Built-in utilities like useResponsive and flexible layout components for creating adaptive UIs across different screen sizes. Customizable Styling: Supports inline sx prop styling (MUI-like) and QSS (Qt Style Sheets) for advanced, themeable designs. Type-Safe Development: Leverages Python’s type hints and optional static type checking for robust, maintainable codebases. Cross-Platform: Powered by PySide6, ensuring compatibility with Windows, macOS, and Linux. Theming Support: Create and apply custom themes to maintain consistent styling across your application.
Installation To get started with QtMui, ensure you have Python 3.8+ installed. Install QtMui and its dependencies using pip:
pip install qtmui
Getting Started Below is an example demonstrating QtMui’s component-based architecture, hooks, and Redux integration: import sys from qtmui.material.qtmui_app import QtMuiApp from qtmui.material.window import QtMuiWindow from qtmui.material.box import Box from qtmui.material.button import Button from qtmui.hooks import useState from qtmui.redux import create_store, useSelector, useDispatch
Define a simple Redux store
def counter_reducer(state=0, action=None): if action["type"] == "INCREMENT": return state + 1 return state
store = create_store(counter_reducer)
class MainWindow(QtMuiWindow): def init(self): super().init() self.setCentralWidget(CounterApp())
class CounterApp: def init(self): self.count, self.set_count = useState(0) self.dispatch = useDispatch()
def render(self):
count = useSelector(lambda state: state)
return Box(
direction="column",
spacing=10,
sx={"padding": 20},
children=[
Box(sx={"font-size": 20}, children=f"Count: {count}"),
Button(
children="Increment",
on_click=lambda: self.dispatch({"type": "INCREMENT"}),
sx={"background-color": "blue", "color": "white"}
)
]
)
if name == "main": app = QtMuiApp(sys.argv) window = MainWindow() window.show() sys.exit(app.exec())
This example showcases a counter app using useState, Redux, and the Box and Button components, demonstrating QtMui’s declarative and reactive capabilities. Key Components QtMui offers a full suite of components inspired by Material-UI, including but not limited to:
Box: A flexible container for layout management with support for direction, spacing, and custom styling. Button: A customizable button with variants, colors, and event handling. TextField: An input component with form validation support. Grid: A responsive grid system for complex layouts. Typography: A component for styled text with customizable fonts and sizes.
Explore the full component library at https://qtmui.com/docs/components. Hooks QtMui provides a rich set of hooks to manage state, side effects, and responsive behavior:
useState: Manage local component state. useEffect: Handle side effects like data fetching or DOM updates. useResponsive: Access screen size and device information for responsive design. useSelector/useDispatch: Integrate with Redux for global state management.
Learn more about hooks at https://qtmui.com/docs/hooks. Form Handling QtMui’s hookform and formvalidate utilities simplify form creation and validation: from qtmui.material.hookform import useForm from qtmui.material.text_field import TextField
def FormExample(): form = useForm({"name": ""}, {"name": {"required": True, "minLength": 3}}) return Box( children=[ TextField( name="name", label="Name", form=form, sx={"width": 200} ), Button( children="Submit", on_click=form.submit, sx={"margin-top": 10} ) ] )
This example demonstrates a simple form with validation, powered by hookform. Styling and Theming QtMui supports both inline sx styling and global QSS theming. Example of inline styling: Box(sx={"background-color": "blue", "border-radius": 5, "padding": 10})
For global theming, define a QSS function: from qtmui.material.styles.create_theme.theme_reducer import ThemeState
def theme_styles(_theme) -> dict: theme: ThemeState = _theme return { "PyBox": { "styles": { "root": {"backgroundColor": "transparent", "color": theme.palette.text.primary} } } }
Visit https://qtmui.com/docs/styling for detailed theming guides. Redux Integration QtMui seamlessly integrates with Redux for global state management. Define reducers and use hooks like useSelector and useDispatch to interact with the store, as shown in the Getting Started example. Contributing We welcome contributions to QtMui! To contribute:
Fork the repository at https://github.com/qtmui/qtmui. Create a new branch for your feature or bug fix. Submit a pull request with a clear description of your changes.
Please adhere to our coding standards and include tests where applicable. Check our contribution guidelines at https://qtmui.com/docs/contributing. License QtMui is licensed under the MIT License. See the LICENSE file for details. Contact For support, feedback, or inquiries, visit https://qtmui.com/support or file an issue at https://github.com/qtmui/qtmui/issues. Join our community discussions to connect with other developers. Learn More Explore the full documentation, tutorials, and API reference at https://qtmui.com to unlock the full potential of QtMui.
Metadata
Release files for qtmui 0.0.60
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qtmui-0.0.60.tar.gz | 20.5 MB | Without provenance | Details for qtmui-0.0.60.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qtmui-0.0.60-py3-none-any.whl | Python 3 | none | any | Details for qtmui-0.0.60-py3-none-any.whl |
Total release size: 41.5 MB
Release files / qtmui-0.0.60.tar.gz
| Download URL | qtmui-0.0.60.tar.gz |
|---|---|
| Size | 20.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c695c1f6b22c2f5d044c00167c23db7371f63d8c9b287bd9324372eac8bfbc7
|
|
BLAKE2b-256 checksum How to use checksums |
46ac7a06b8bea0c1b31b25e7de99414d6b9b0161727f97ca16ca496f6986d941
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.6
|
Release files / qtmui-0.0.60-py3-none-any.whl
| Download URL | qtmui-0.0.60-py3-none-any.whl |
|---|---|
| Size | 21.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1475e09b344f56bc6c61e132a1d0bd58ecc184e665d100d1bf753aee5ef04c64
|
|
BLAKE2b-256 checksum How to use checksums |
3d543d3c8dd9e60c6b933e12cf4d5c5207955804c7121555a66ed7a8e881533b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.6
|
Security for qtmui 0.0.60
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.