An easy way to make Qt GUIs using the argparse standard module
Project description
argparseqt
An easy way to make Qt GUIs using the argparse standard module
Installation
Via pip:
pip install argparseqt
From source:
git clone https://github.com/domstoppable/argparseqt.git
cd argparseqt.git
python setup.py install
Dependencies
Requires:
- qtpy
- Qt bindings for Python (either
PySide2,PyQt5,PySide, orPyQt)
Usage
Quick start
import argparse
import argparseqt.gui
parser = argparse.ArgumentParser(description='Main settings')
parser.add_argument('--storeConst', action='store_const', const=999)
textSettings = parser.add_argument_group('Strings', description='Text input')
textSettings.add_argument('--freetext', type=str, default='Enter freetext here', help='Type anything you want here')
textSettings.add_argument('--pickText', default='I choo-choo-choose you', choices=['Bee mine', 'I choo-choo-choose you'], help='Choose one of these')
app = QtWidgets.QApplication()
dialog = argparseqt.gui.ArgDialog(parser)
dialog.exec_()
if dialog.result() == QtWidgets.QDialog.Accepted:
values = dialog.getValues()
print('Values:', values)
else:
print('User cancelled')
See example.py for more.
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
argparseqt-0.3.4.tar.gz
(8.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file argparseqt-0.3.4.tar.gz.
File metadata
- Download URL: argparseqt-0.3.4.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61873ba72a0efe2d43b608ff2938df8d018f56e0e63ea21e620e611823501fc1
|
|
| MD5 |
64eee65788ed31a12e381a63b666811b
|
|
| BLAKE2b-256 |
d16a77aed76f897b56a8622acdf5fb440f919e212aafc9ad0cb0b993148c1dc8
|
File details
Details for the file argparseqt-0.3.4-py3-none-any.whl.
File metadata
- Download URL: argparseqt-0.3.4-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb5d5b180389e4c94dea068ac0f55af53ed8d753b2b115a15b9f7d7b0b06831c
|
|
| MD5 |
a9cbac423eefcf82dd2dff1ae4db6b20
|
|
| BLAKE2b-256 |
e39637210b25041cbf9daf1dd066a0e56e265576d0d860244c3bd47e6a6c38d4
|