qtpy-frameless-window


Nameqtpy-frameless-window JSON
Version 0.1.2 PyPI version JSON
download
home_page
SummaryA cross-platform frameless window based on QtPy.
upload_time2023-04-17 09:54:40
maintainer
docs_urlNone
author
requires_python>=3.7,<3.10
licenseGPLv3
keywords pyqt frameless
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">

# QtPy-Frameless-Window

[![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm.fming.dev)
[![Downloads](https://static.pepy.tech/badge/qtpy-frameless-window)](https://pepy.tech/project/qtpy-frameless-window)
![GitHub](https://img.shields.io/github/license/TaoChenyue/Qtpy-Frameless-Window?style=plastic)

A cross-platform frameless window based on QtPy.

</div>

## Introduce 
A QWidget/QMainWindow/QDialog is wrapped in another QWidget to realize frameless effect. 
![structure](assets/structure.png)
Only qtpy library is required.

## Install
To install use pip:
```shell
pip install QtPy-Frameless-Window
```
Or clone the repo:
```shell
git clone https://github.com/TaoChenyue/QtPy-Frameless-Window.git
pip install -e .
```

## Demo
QtPy use PyQt5 as default Qt API, so you can run demo with PyQt5 like this.
```sh
python examples/dark_demo.py
python examples/light_demo.py
```
Or you can specify your Qt API like this.
```sh
python examples/dark_demo.py --api pyside6
python examples/light_demo.py --api pyqt6
...
```
It is realized by an easy function.
```python 
import argparse
import os
def set_qt_api(api:str="pyqt5",parse:bool=False):
    if parse:
        parser = argparse.ArgumentParser(description='Set Qt API')
        parser.add_argument('--api', type=str)
        args = parser.parse_args()
        if args.api is not None:
            api=args.api
    os.environ["QT_API"]=api
```

![light_demo](assets/light_demo.png)

![dark_demo](assets/dark_demo.png)

## Reference
1. [PyQt-Frameless-Window](https://github.com/zhiyiYo/PyQt-Frameless-Window)
2. [draw window shadow](https://blog.csdn.net/goforwardtostep/article/details/99549750)


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "qtpy-frameless-window",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<3.10",
    "maintainer_email": "",
    "keywords": "pyqt frameless",
    "author": "",
    "author_email": "TaoChenyue <3038816978@qq.com>",
    "download_url": "https://files.pythonhosted.org/packages/0b/c5/ae7355e2ca5b8b1f204421743bf00ad715650def7ab56eee8d5969b02058/QtPy-Frameless-Window-0.1.2.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n\n# QtPy-Frameless-Window\n\n[![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm.fming.dev)\n[![Downloads](https://static.pepy.tech/badge/qtpy-frameless-window)](https://pepy.tech/project/qtpy-frameless-window)\n![GitHub](https://img.shields.io/github/license/TaoChenyue/Qtpy-Frameless-Window?style=plastic)\n\nA cross-platform frameless window based on QtPy.\n\n</div>\n\n## Introduce \nA QWidget/QMainWindow/QDialog is wrapped in another QWidget to realize frameless effect. \n![structure](assets/structure.png)\nOnly qtpy library is required.\n\n## Install\nTo install use pip:\n```shell\npip install QtPy-Frameless-Window\n```\nOr clone the repo:\n```shell\ngit clone https://github.com/TaoChenyue/QtPy-Frameless-Window.git\npip install -e .\n```\n\n## Demo\nQtPy use PyQt5 as default Qt API, so you can run demo with PyQt5 like this.\n```sh\npython examples/dark_demo.py\npython examples/light_demo.py\n```\nOr you can specify your Qt API like this.\n```sh\npython examples/dark_demo.py --api pyside6\npython examples/light_demo.py --api pyqt6\n...\n```\nIt is realized by an easy function.\n```python \nimport argparse\nimport os\ndef set_qt_api(api:str=\"pyqt5\",parse:bool=False):\n    if parse:\n        parser = argparse.ArgumentParser(description='Set Qt API')\n        parser.add_argument('--api', type=str)\n        args = parser.parse_args()\n        if args.api is not None:\n            api=args.api\n    os.environ[\"QT_API\"]=api\n```\n\n![light_demo](assets/light_demo.png)\n\n![dark_demo](assets/dark_demo.png)\n\n## Reference\n1. [PyQt-Frameless-Window](https://github.com/zhiyiYo/PyQt-Frameless-Window)\n2. [draw window shadow](https://blog.csdn.net/goforwardtostep/article/details/99549750)\n\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "A cross-platform frameless window based on QtPy.",
    "version": "0.1.2",
    "split_keywords": [
        "pyqt",
        "frameless"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bf09e33dcc846250915c675456d5aeddcac7a9fdb48c1e69ba394368e2961b21",
                "md5": "fb1238b2778c491cbfebda4c44a0c729",
                "sha256": "2484abb90e094f4b4f8e382381a47d70867cdba0124bd35d03fc555a5c859495"
            },
            "downloads": -1,
            "filename": "QtPy_Frameless_Window-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fb1238b2778c491cbfebda4c44a0c729",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<3.10",
            "size": 20838,
            "upload_time": "2023-04-17T09:54:38",
            "upload_time_iso_8601": "2023-04-17T09:54:38.678485Z",
            "url": "https://files.pythonhosted.org/packages/bf/09/e33dcc846250915c675456d5aeddcac7a9fdb48c1e69ba394368e2961b21/QtPy_Frameless_Window-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0bc5ae7355e2ca5b8b1f204421743bf00ad715650def7ab56eee8d5969b02058",
                "md5": "64f6928db54d6dc38a91ca7d27e4a2af",
                "sha256": "0ae527a9cf91b2b52686f7a87d1601ee0e33507958e9e25cfb1b9f28dac52634"
            },
            "downloads": -1,
            "filename": "QtPy-Frameless-Window-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "64f6928db54d6dc38a91ca7d27e4a2af",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<3.10",
            "size": 19465,
            "upload_time": "2023-04-17T09:54:40",
            "upload_time_iso_8601": "2023-04-17T09:54:40.918505Z",
            "url": "https://files.pythonhosted.org/packages/0b/c5/ae7355e2ca5b8b1f204421743bf00ad715650def7ab56eee8d5969b02058/QtPy-Frameless-Window-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-17 09:54:40",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "qtpy-frameless-window"
}
        
Elapsed time: 0.52286s