Metadata-Version: 2.1
Name: prettyqt
Version: 1.48.0
Summary: A pythonic layer on top of PyQt6 / PySide6
Home-page: https://github.com/phil65/prettyqt
Author: phil65
Author-email: philipptemminghoff@googlemail.com
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Provides-Extra: addons
Provides-Extra: pyqt6
Provides-Extra: pyside6
Requires-Dist: PyQt6 (>=6.5,<7.0) ; extra == "pyqt6"
Requires-Dist: PyQt6-Charts (>=6.5,<7.0) ; extra == "pyqt6"
Requires-Dist: PyQt6-QScintilla (>=2.0,<3.0) ; extra == "pyqt6"
Requires-Dist: PyQt6-WebEngine (>=6.5,<7.0) ; extra == "pyqt6"
Requires-Dist: bidict (>=0,<1)
Requires-Dist: comtypes (>=1.1,<2.0) ; sys_platform == "win32"
Requires-Dist: deprecated (>=1.2,<2.0)
Requires-Dist: docutils (>=0.19,<0.20) ; extra == "addons"
Requires-Dist: fsspec (>=2023.1.0,<2024.0.0) ; extra == "addons"
Requires-Dist: ipython (>=8,<9) ; extra == "addons"
Requires-Dist: numpy (>=1,<2) ; extra == "addons"
Requires-Dist: orjson (>=3,<4) ; (python_version < "3.12") and (extra == "addons")
Requires-Dist: pandas (>=2.0.2,<3.0.0) ; extra == "addons"
Requires-Dist: pillow (>=9.5.0,<10.0.0) ; extra == "addons"
Requires-Dist: pygments (>=2.6,<3.0)
Requires-Dist: pyside6 (>=6.5,<7.0) ; (python_version < "3.12") and (extra == "pyside6")
Requires-Dist: pywin32 ; sys_platform == "win32"
Requires-Dist: qstylizer (>=0.2,<0.3)
Requires-Dist: qtconsole (>=5,<6) ; extra == "addons"
Requires-Dist: regex (>=2023,<2024)
Requires-Dist: typing-extensions (>=4.5.0,<5.0.0)
Project-URL: Repository, https://github.com/phil65/prettyqt
Description-Content-Type: text/markdown

# prettyqt: Pythonic layer on top of PyQt6 / PySide6
[![PyPI Latest Release](https://img.shields.io/pypi/v/prettyqt.svg)](https://pypi.org/project/prettyqt/)
[![Package Status](https://img.shields.io/pypi/status/prettyqt.svg)](https://pypi.org/project/prettyqt/)
[![License](https://img.shields.io/pypi/l/prettyqt.svg)](https://github.com/phil65/PrettyQt/blob/master/LICENSE)
[![CodeCov](https://codecov.io/gh/phil65/PrettyQt/branch/master/graph/badge.svg)](https://codecov.io/gh/phil65/PrettyQt)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![PyUp](https://pyup.io/repos/github/phil65/PrettyQt/shield.svg)](https://pyup.io/repos/github/phil65/PrettyQt/)

## What is it?

**PrettyQt** is a Python package that provides a pythonic layer on top of the GUI frameworks PyQt6 / PySide6.

## Main Features
  - Large parts of the Qt API are available in a **PEP-8**-compliant way.
  - Pre-defined widgets for common use cases
  - Large set of validators, syntax highlighters, models and much more.

PrettyQt basically is a wrapper for the whole Qt API (either based on PySide6 or PyQt6).
The library contains a tree of mixins, with one mixin for each Qt class.
These mixins also inherit from each other and are applied to the Qt classes.
That way each class gets all helper methods from all sub-mixins.
Example: The class "TreeView" inherits from original Qt Class "QTreeView" and gets helper methods
from "TreeViewMxin", "AbstractItemViewMixin", "AbstractScrollAreaMixin",
"FrameMixin", "WidgetMixin" and "ObjectMixin".

Main objective is to make Qt feel "pythonic". Qt is originally a C++ Framework,
and using it can be quite cumbersome for Python developers. (it´s statically typed,
very OOP-centric, lot of enum use, snakeCase naming etc.) PrettyQt aims to improve this by:

- adding more powerful methods to the classes, which accept more types and have more options (aka keyword arguments)
- adding a lot of __dunder__ methods to the classes to make them behave like good python citizens.
- adding replacements for all Qt Methods which work with enums. Strings are the preferred choice in PrettyQt.


Apart from the 3D related modules (Qt3D, QtDataVizualization),
almost every class from Qt is covered.

### The covered modules are:

QtBluetooth (-> prettyqt.bluetooth)
QtCharts (-> prettyqt.charts)
QtCore (-> prettyqt.core)
QtDesigner (-> prettyqt.designer)
QtGui (-> prettyqt.gui)
QtLocation (-> prettyqt.location)
QtMultimedia (-> prettyqt.multimedia)
QtMultimediaWidgets (-> prettyqt.multimediawidgets)
QtNetwork (-> prettyqt.network)
QtOpenGLWidgets (-> prettyqt.openglwidgets)
QtPdf (-> prettyqt.pdf)
QtPdfWidgets (-> prettyqt.pdfwidgets)
QtPositioning (-> prettyqt.positioning)
QtPrintSupport (-> prettyqt.printsupport)
QtQml (-> prettyqt.qml)
QtHelp (-> prettyqt.qthelp) (prepended "qt" to avoid name clashing)
QtQuick (-> prettyqt.quick)
QtQuickWidgets (-> prettyqt.quickwidgets)
QScintilla (-> prettyqt.scintilla)
QtScXml (-> prettyqt.scxml)
QtStateMachine (-> prettyqt.statemachine)
QtSvg (-> prettyqt.svg)
QtSvgWidgets (-> prettyqt.svgwidgets)
QtTextToSpeech (-> prettyqt.texttospeech)
QtWebChannel (-> prettyqt.webchannel)
QtWebEngineCore (-> prettyqt.webenginecore)
QtWebEngineWidgets (-> prettyqt.webenginewidgets)
QtWidgets (-> prettyqt.widgets)


All subclassed Qt classes in mentioned modules are called exactly like the
Qt-Counterpart, except that the leading Q is missing.

### Examples:

QtWidgets.QWidget -> widgets.Widget
QtCore.QObject -> core.Object

Apart from the mentioned mixin tree and the corresponding classes, this library also
contains a lot of custom widgets, delegates, eventfilters, validators,
syntaxhighlighters, layouts, models, proxy models and much more.

Converting to PrettyQt should be very straightforward since the original behaviour of the
Qt classes didnt change for the largest parts and all methods from base Qt modules
are still available. (There might be a few constructors with slightly different behaviour though.)

Interested? Take a look at the documentation! (even though it totally sucks in its current state.)

## Where to get it
The source code is currently hosted on GitHub at:
https://github.com/phil65/PrettyQt

The latest released version are available at the [Python
package index](https://pypi.org/project/prettyqt).

```sh
# or PyPI
pip install prettyqt
```

## Required dependencies
- [bidict](https://pypi.org/project/bidict)
- [regex](https://pypi.org/project/regex)
- [docutils](https://pypi.org/project/docutils)
- [pygments](https://pypi.org/project/pygments)
- [qstylizer](https://pypi.org/project/qstylizer)
- [typing_extensions](https://pypi.org/project/typing_extensions)

# And one of...
- [pyside6](https://pypi.org/project/pyside6)
- [pyqt6](https://pypi.org/project/pyqt6)


## Optional dependencies
- [orjson](https://pypi.org/project/orjson)
- [numpy](https://pypi.org/project/numpy)
- [ipython](https://pypi.org/project/ipython)
- [qtconsole](https://pypi.org/project/qtconsole)
- [pillow](https://pypi.org/project/pillow)
- [fsspec](https://pypi.org/project/fsspec)


## Installation from sources

This project uses poetry for dependency management and packaging. Install this first.
In the `prettyqt` directory (same one where you found this file after
cloning the git repo), execute:

```sh
poetry install
```

## License
[MIT](LICENSE)

## Documentation
The official documentation is hosted on Github Pages: https://phil65.github.io/PrettyQt/

## Contributing to prettyqt [![Open Source Helpers](https://www.codetriage.com/phil65/prettyqt/badges/users.svg)](https://www.codetriage.com/phil65/prettyqt)

All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome.

Or maybe through using PrettyQt you have an idea of your own or are looking for something in the documentation and thinking ‘this can be improved’...you can do something about it!

