Like Bootstrap, but qt-er.
Project description
QtStrap: Qt application bootstrapping framework
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.
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
$ 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:
$ python3 app/main.py
If you see a window like this, then you're good to go:
Custom Widgets
LabelEdit
HLine
andVLine
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
pip install qtstrap
Contributing
Contributions are always welcome. Feel free to open an issue or start a new discussion on our GitHub.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file qtstrap-0.6.6.tar.gz
.
File metadata
- Download URL: qtstrap-0.6.6.tar.gz
- Upload date:
- Size: 138.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37ef17ee12689cf00772bb15a4de922a88af508930b04ab30808c2c18ee2f41e |
|
MD5 | f25e1e05ef315b456add53dd6b54455c |
|
BLAKE2b-256 | 078a4b94b7d2e42a579a601f67c42989875cc521b0963ff910888839e2672ad5 |
File details
Details for the file qtstrap-0.6.6-py3-none-any.whl
.
File metadata
- Download URL: qtstrap-0.6.6-py3-none-any.whl
- Upload date:
- Size: 76.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab1622bb5bde73ddc766db4522729fffe7120ab7a2e612539debbcb04c838d9d |
|
MD5 | 94165a05ddffda419d5cb4ae219fdfc7 |
|
BLAKE2b-256 | 473bd6dcb6ecb4a74957a2694b95d0d0595ad454298a9df617a11d44a5eb4e7b |