qtstrap


Nameqtstrap JSON
Version 0.6.2 PyPI version JSON
download
home_pagehttps://github.com/qtstrap/qtstrap
SummaryLike Bootstrap, but qt-er.
upload_time2024-06-11 18:07:19
maintainerNone
docs_urlNone
authorDavid Kincaid
requires_python>=3.8
licenseMIT
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://qtstrap.github.io/).

* `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 or PyQt5
* 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": "https://github.com/qtstrap/qtstrap",
    "name": "qtstrap",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "David Kincaid",
    "author_email": "dlkincaid0@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/84/10/fb71aa6879465238256274ebd9872891c0c4bdb7ba8f0f4a57056cd3ebe2/qtstrap-0.6.2.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://qtstrap.github.io/).\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 or PyQt5\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",
    "summary": "Like Bootstrap, but qt-er.",
    "version": "0.6.2",
    "project_urls": {
        "Documentation": "https://qtstrap.github.io/",
        "Homepage": "https://github.com/qtstrap/qtstrap",
        "Source": "https://github.com/qtstrap/qtstrap",
        "Tracker": "https://github.com/qtstrap/qtstrap/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1caa465c0da7cab63242dc929f40ef61896d9b4e0cd5e8d198fd19fa1ff21e7c",
                "md5": "54ed90a55c6646c673294105753953dc",
                "sha256": "2879c0778129de21aac29804a01df3e0d74614a50dac7081af9e9b0ab30e826f"
            },
            "downloads": -1,
            "filename": "qtstrap-0.6.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "54ed90a55c6646c673294105753953dc",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 76145,
            "upload_time": "2024-06-11T18:07:17",
            "upload_time_iso_8601": "2024-06-11T18:07:17.834610Z",
            "url": "https://files.pythonhosted.org/packages/1c/aa/465c0da7cab63242dc929f40ef61896d9b4e0cd5e8d198fd19fa1ff21e7c/qtstrap-0.6.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8410fb71aa6879465238256274ebd9872891c0c4bdb7ba8f0f4a57056cd3ebe2",
                "md5": "b4d6382372863ea68ce93b8568593782",
                "sha256": "3dc3cdd94853f549177eb410c19e1d4252c470d85861a95da614507fe83b7e0a"
            },
            "downloads": -1,
            "filename": "qtstrap-0.6.2.tar.gz",
            "has_sig": false,
            "md5_digest": "b4d6382372863ea68ce93b8568593782",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 101385,
            "upload_time": "2024-06-11T18:07:19",
            "upload_time_iso_8601": "2024-06-11T18:07:19.764310Z",
            "url": "https://files.pythonhosted.org/packages/84/10/fb71aa6879465238256274ebd9872891c0c4bdb7ba8f0f4a57056cd3ebe2/qtstrap-0.6.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-11 18:07:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "qtstrap",
    "github_project": "qtstrap",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "qtstrap"
}
        
Elapsed time: 0.27463s