qtstrap


Nameqtstrap JSON
Version 0.7.1 PyPI version JSON
download
home_pageNone
SummaryLike Bootstrap, but qt-er.
upload_time2024-12-29 00:42:14
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License Copyright (c) 2021 DaelonSuzuka Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # QtStrap: Qt application bootstrapping framework


[![license](https://img.shields.io/pypi/l/qtstrap.svg)](./LICENSE)
[![pypi version](https://img.shields.io/pypi/v/qtstrap.svg)](https://pypi.org/project/qtstrap/)
[![PyPI status](https://img.shields.io/pypi/status/qtstrap.svg)](https://github.com/qtstrap/qtstrap)


Qt is excellent, but it's also enormous. There's a lot of topics, and many of them have hidden gotchas. PySide2 and PyQt are also excellent, letting us leverage the powerful Qt libraries from up in the clouds in PythonLand, but this arrangement has its own gotchas. 

The goal of qtstrap is get your applications up and running quickly, so you can focus on your problem instead of on Qt's idiosyncracies.

# Features

More complete docs are available [here](https://docs.qtstrap.dev).

* `qtstrap` command line tool to bootstrap new projects
* crossplatform makefile with useful development commands
* preconfigured build system using PyInstaller and InnoSetup
* custom Qt widgets with useful behaviors
* Pythonic layout system using ContextLayouts
* Some other stuff I haven't remembered yet

# Quick start

```sh
$ mkdir test && cd test
$ python3 -m venv .venv
$ source .venv/bin/activate
$ python3 -m pip install qtstrap PySide6
$ qtstrap init
```

The init script will prompt you to enter the name of your application and the name of its publisher(which is probably you), and then it will generate an application skeleton.

You can test that everything installed properly by executing:
```sh
$ python3 app/main.py
```
If you see a window like this, then you're good to go:

![screenshot](docs/screenshot1.png) 

## Custom Widgets

- `LabelEdit`
- `HLine` and `VLine`
- `LinkLabel`
- Buttons:
  - `StateButton`
  - `IconToggleButton`
  - `ConfirmToggleButton`
  - `MenuButton`
- Persistent Widgets (for rapid prototyping of saved data):
  - `PersistentCheckableAction`
  - `PersistentCheckBox`
  - `PersistentComboBox`
  - `PersistentLineEdit`
  - `PersistentListWidget`
  - `PersistentPlainTextEdit`
  - `PersistentTabWidget`
  - `PersistentTextEdit`
  - `PersistentTreeWidget`

## Utility Classes and Functions
- `Adapter`
- `TimeStamp`
- `StringBuilder`
- `call_later()`

## decorators:
- `@accepts_file_drops`
- `@trace`
- `@singleton`

## context managers:
- `Defer`
- `SignalBlocker`

## qtstrap.extras:
  - `CommandPalette`, like VSCode or SublimeText
  - Logging Subsystem: log to local database + log viewer widgets
  - `CodeEditor`: Custom QTextEditor subclass customized for code editing


# Dependencies

* Python 3
* PySide2/PySide6 or PyQt5/PyQt6
* Make(optional, but recommended)

# Installation

```sh 
pip install qtstrap
```

# Contributing

Contributions are always welcome. Feel free to [open an issue](https://github.com/qtstrap/qtstrap/issues/new)
or [start a new discussion](https://github.com/qtstrap/qtstrap/discussions/new) on our GitHub.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "qtstrap",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "David Kincaid <daelonsuzuka@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/9b/b3/5924779e660d18d30a191864b07115e2acebbbc23ae1163cbd18badcaf2f/qtstrap-0.7.1.tar.gz",
    "platform": null,
    "description": "# QtStrap: Qt application bootstrapping framework\r\n\r\n\r\n[![license](https://img.shields.io/pypi/l/qtstrap.svg)](./LICENSE)\r\n[![pypi version](https://img.shields.io/pypi/v/qtstrap.svg)](https://pypi.org/project/qtstrap/)\r\n[![PyPI status](https://img.shields.io/pypi/status/qtstrap.svg)](https://github.com/qtstrap/qtstrap)\r\n\r\n\r\nQt is excellent, but it's also enormous. There's a lot of topics, and many of them have hidden gotchas. PySide2 and PyQt are also excellent, letting us leverage the powerful Qt libraries from up in the clouds in PythonLand, but this arrangement has its own gotchas. \r\n\r\nThe goal of qtstrap is get your applications up and running quickly, so you can focus on your problem instead of on Qt's idiosyncracies.\r\n\r\n# Features\r\n\r\nMore complete docs are available [here](https://docs.qtstrap.dev).\r\n\r\n* `qtstrap` command line tool to bootstrap new projects\r\n* crossplatform makefile with useful development commands\r\n* preconfigured build system using PyInstaller and InnoSetup\r\n* custom Qt widgets with useful behaviors\r\n* Pythonic layout system using ContextLayouts\r\n* Some other stuff I haven't remembered yet\r\n\r\n# Quick start\r\n\r\n```sh\r\n$ mkdir test && cd test\r\n$ python3 -m venv .venv\r\n$ source .venv/bin/activate\r\n$ python3 -m pip install qtstrap PySide6\r\n$ qtstrap init\r\n```\r\n\r\nThe init script will prompt you to enter the name of your application and the name of its publisher(which is probably you), and then it will generate an application skeleton.\r\n\r\nYou can test that everything installed properly by executing:\r\n```sh\r\n$ python3 app/main.py\r\n```\r\nIf you see a window like this, then you're good to go:\r\n\r\n![screenshot](docs/screenshot1.png) \r\n\r\n## Custom Widgets\r\n\r\n- `LabelEdit`\r\n- `HLine` and `VLine`\r\n- `LinkLabel`\r\n- Buttons:\r\n  - `StateButton`\r\n  - `IconToggleButton`\r\n  - `ConfirmToggleButton`\r\n  - `MenuButton`\r\n- Persistent Widgets (for rapid prototyping of saved data):\r\n  - `PersistentCheckableAction`\r\n  - `PersistentCheckBox`\r\n  - `PersistentComboBox`\r\n  - `PersistentLineEdit`\r\n  - `PersistentListWidget`\r\n  - `PersistentPlainTextEdit`\r\n  - `PersistentTabWidget`\r\n  - `PersistentTextEdit`\r\n  - `PersistentTreeWidget`\r\n\r\n## Utility Classes and Functions\r\n- `Adapter`\r\n- `TimeStamp`\r\n- `StringBuilder`\r\n- `call_later()`\r\n\r\n## decorators:\r\n- `@accepts_file_drops`\r\n- `@trace`\r\n- `@singleton`\r\n\r\n## context managers:\r\n- `Defer`\r\n- `SignalBlocker`\r\n\r\n## qtstrap.extras:\r\n  - `CommandPalette`, like VSCode or SublimeText\r\n  - Logging Subsystem: log to local database + log viewer widgets\r\n  - `CodeEditor`: Custom QTextEditor subclass customized for code editing\r\n\r\n\r\n# Dependencies\r\n\r\n* Python 3\r\n* PySide2/PySide6 or PyQt5/PyQt6\r\n* Make(optional, but recommended)\r\n\r\n# Installation\r\n\r\n```sh \r\npip install qtstrap\r\n```\r\n\r\n# Contributing\r\n\r\nContributions are always welcome. Feel free to [open an issue](https://github.com/qtstrap/qtstrap/issues/new)\r\nor [start a new discussion](https://github.com/qtstrap/qtstrap/discussions/new) on our GitHub.\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2021 DaelonSuzuka  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Like Bootstrap, but qt-er.",
    "version": "0.7.1",
    "project_urls": {
        "Documentation": "https://docs.qtstrap.dev",
        "Homepage": "https://github.com/qtstrap/qtstrap",
        "Issues": "https://github.com/qtstrap/qtstrap/issues",
        "Repository": "https://github.com/qtstrap/qtstrap"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6ce8df77c64f028235b002ab4d8215143ccd150b9b74bb6664885fe88639c3f7",
                "md5": "49dac51d00fb6eda8ee49bf39a920709",
                "sha256": "1cb021447112d4d2775ec279c93cc5824c7a440fc2ef37704824db07bdbaab54"
            },
            "downloads": -1,
            "filename": "qtstrap-0.7.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "49dac51d00fb6eda8ee49bf39a920709",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 76745,
            "upload_time": "2024-12-29T00:42:13",
            "upload_time_iso_8601": "2024-12-29T00:42:13.276921Z",
            "url": "https://files.pythonhosted.org/packages/6c/e8/df77c64f028235b002ab4d8215143ccd150b9b74bb6664885fe88639c3f7/qtstrap-0.7.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9bb35924779e660d18d30a191864b07115e2acebbbc23ae1163cbd18badcaf2f",
                "md5": "99f7b864a1ee4de664365a1a795fe4e6",
                "sha256": "70abae958402970dc2bcd3fbd958b20800fa1b946ed5c308063ea8ed40ae4b8f"
            },
            "downloads": -1,
            "filename": "qtstrap-0.7.1.tar.gz",
            "has_sig": false,
            "md5_digest": "99f7b864a1ee4de664365a1a795fe4e6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 138663,
            "upload_time": "2024-12-29T00:42:14",
            "upload_time_iso_8601": "2024-12-29T00:42:14.474714Z",
            "url": "https://files.pythonhosted.org/packages/9b/b3/5924779e660d18d30a191864b07115e2acebbbc23ae1163cbd18badcaf2f/qtstrap-0.7.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-29 00:42:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "qtstrap",
    "github_project": "qtstrap",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "qtstrap"
}
        
Elapsed time: 0.37805s