PySimpleGUI designer, that uses transpiler to produce code from Qt Designer xml file.
Project description
PySimpleGUI Designer
Install:
# Requirements: pyside2
# $ pip install PySide2
pip install PySimpleGUIDesigner
Usage
Use GUI(by default):
PySimpleGUIDesigner
Use CLI:
PySimpleGUIDesigner -xml "~/folder1/test.ui" -ob "somegroupBox"
Want to know parameters? Get help by:
PySimpleGUIDesigner --help
Output:
Usage: main.py [OPTIONS]
Options:
-v, --verbose Verbose mode
-x, --run Just run gui example
-xml, --xmlfile PATH absolute or relative path to ui_file
-ob, --objname TEXT Object name of target container
-nobadwidgets Forget about not-implemented(bad) widgets.
Default - True
-ic, --indent_char TEXT Indent character. Default is " "
-ia, --indent_char_size INTEGER
Indent size
-o, --outputfile PATH Output file for PySimpleGUI code
-pp_mouse Option - generate buttons events
-pp_keys Option - generate all events
--help Show this message and exit.
I don't want pip install
, how to use this repo's source code?
Download this repo, cd into it.
Run gui:
python3 main.py
If you see this error:
ModuleNotFoundError: No module named '__main__.transpiler2'; '__main__' is not a package
THEN just change in main.py
line:
from .transpiler2 import *
to
from transpiler2 import *
Using as normal (easy):
python3 main.py --xmlfile="~/folder1/test.ui" --objname="somegroupBox"
# OR
python3 main.py -xml "~/folder1/test.ui" -ob "somegroupBox"
Examples:
#=================== Basics:
### relative path
python3 main.py -xmlfile "untitled.ui" -objname="text1"
python3 main.py -xmlfile "examples_of_ui/untitled.ui" -objname="vv1"
### absolute path
python3 main.py -xmlfile "/tmp/examples_of_ui/untitled.ui" -objname="text1"
#=================== Indent:
# ia = indent amount, ic = indent char
python3 main.py -xmlfile "untitled.ui" -objname="text1" -ic " "
python3 main.py -xmlfile "untitled.ui" -objname="text1" -ic " " -ia 1 # the same effect, as command above
python3 main.py -xmlfile "untitled.ui" -objname="text1" -ic " " -ia 2
### add boilerplate to output file
python3 main.py -xmlfile "untitled.ui" -objname="text1" -pp_mouse -ic " " -ia 2
python3 main.py -xmlfile "untitled.ui" -objname="text1" -pp_keys
python3 main.py -xmlfile "untitled.ui" -objname="text1" -ic " " -ia 2 -pp_keys
Todo
Possible:
- improve
psg_ui_maker.py
- somewhere in__init__
method, maybe; - add some
picking templates
for user - add some
boilerplate
's in output generated code - maybe some unit tests, idk.
pytest
?
FAQ
How do I use PySimpleGUIDesigner WITH Qt Designer? Watch this video (by me):
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
Close
Hashes for PySimpleGUIDesigner-0.1.4.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9282177db68063ac60cd45eacbddc97f89e778904ad9b0b8ca01240b1fe8e054 |
|
MD5 | 09a7d0def6eabe92e73cd4d1aef0e0cf |
|
BLAKE2b-256 | 1c95330d81b81d2fd70c38e25af2a9862a50fe102298d5c1a47bb7c505743fff |
Close
Hashes for PySimpleGUIDesigner-0.1.4.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ec69af8ddcb510fe3fa012841204b40a27454677e9d4a2fa06a205cdcfdac45 |
|
MD5 | daf0f348f36a3ffab60565fa2f62cf8c |
|
BLAKE2b-256 | e922f30cb6b23afb9f0189fdc2ad88b885d00b2cc28d7eb5875e2d294f20b2e8 |