Skip to main content

An easy way to make Qt GUIs using the argparse standard module

Project description


An easy way to make Qt GUIs using the argparse standard module


Via pip:

pip install argparseqt

From source:

git clone
cd argparseqt.git
python install



  • qtpy
  • Qt bindings for Python (either PySide2, PyQt5, PySide, or PyQt)


Quick start

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 = argparsegui.gui.ArgDialog(parser)

if dialog.result() == QtWidgets.QDialog.Accepted:
	values = dialog.getValues()
	print('Values:', values)
	print('User cancelled')

See for more.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for argparseqt, version 0.2.4
Filename, size File type Python version Upload date Hashes
Filename, size argparseqt-0.2.4-py3-none-any.whl (7.2 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size argparseqt-0.2.4.tar.gz (5.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page