Skip to main content

PySimpleGUI designer, that uses transpiler to produce PySimpleGUI code from Qt Designer xml file.

Project description

PySimpleGUI Designer


How do I use PySimpleGUIDesigner WITH Qt Designer? Watch this video (by me):


            THIS PACKAGE         Requirements 
pip install PySimpleGUIDesigner  PySide2 click


Use GUI(by default):


Use CLI:

PySimpleGUIDesigner -xml "~/folder1/test.ui" -ob "somegroupBox"

Want to know parameters? Get help by:

PySimpleGUIDesigner --help
# Output:
Usage: [OPTIONS]

  -v, --verbose                   Verbose mode
  -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_amount INTEGER
                                  Indent amount
  -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 want to use source code directly (from this repo code)

Ok(I don't know you need this), but here are the steps.

Let's imagine you say "I don't want pip install, I want to donwload this repo and run code. How can I do this?"

Solution 1:

# removing (if installed) PySimpleGUIDesigner:
pip uninstall -y PySimpleGUIDesigner

mkdir psgdesigner
cd psgdesigner
git clone
python3 -m PySimpleGUIDesigner
# NOTE for Windows users: replace "python3"   with   "python" OR "py"

# ALSO, output "help" by:
# $ python3 -m PySimpleGUIDesigner --help

Solution 2:

mkdir psgdesigner
cd psgdesigner
git clone
cd PySimpleGUIDesigner
python3 -m
# for Windows users: replace "python3"   with   "python" OR "py"

Examples (fun part)

Using as normal (easy):
python3 --xmlfile="~/folder1/test.ui" --objname="somegroupBox"
# a bit shorter command:
python3 -xml "~/folder1/test.ui" -ob "somegroupBox"

hot-reloader trick For Unix-like OS

I like to use watch command. This command will compile every 3 second and output to the screen:

watch -n 3 PySimpleGUIDesigner -xml "~/folder1/test.ui" -ob somegroupBox

also, there is an entr command (install by apt install entr), which works even better. It makes you command, when file is changed:

This command will compile file ~/folder1/test.ui, when you change it(like you hit ctrl+s to save layout in .ui file):

echo "~/folder1/test.ui" | entr -p -s 'PySimpleGUIDesigner -xml "~/folder1/test.ui" -ob somegroupBox'

If you are on Windows OS without bash, then PySimpleGUIDesigner has build-it hot-reloader! So, use it, if you need.

Redirect output

Use bash redirect (or -o option):

PySimpleGUIDesigner -xml untitled.ui -ob v1 >
PySimpleGUIDesigner -xml untitled.ui -ob v1 -o

More Examples:

#=================== Basics:
### using relative path:
python3 -xmlfile "untitled.ui" -objname="text1"
python3 -xmlfile "examples_of_ui/untitled.ui" -objname="vv1"

### using absolute path:
python3 -xmlfile "/tmp/examples_of_ui/untitled.ui" -objname="text1"

#=================== Indent:
# ia = indent amount, ic = indent char
# indent 1:
python3 -xmlfile "untitled.ui" -objname="text1" -ic " "
python3 -xmlfile "untitled.ui" -objname="text1" -ic " " -ia 1 # the same effect, as command above
# indent 2:
python3 -xmlfile "untitled.ui" -objname="text1" -ic " " -ia 2

### add boilerplate to output file
python3 -xmlfile "untitled.ui" -objname="text1" -pp_mouse -ic " " -ia 2
python3 -xmlfile "untitled.ui" -objname="text1" -pp_keys
python3 -xmlfile "untitled.ui" -objname="text1" -ic " " -ia 2 -pp_keys

Gogol, HELP me! I don't know what I'm doing!

Keep calm. I will try to help you.

Really do super easy thing - "Open Issue" in this repository:


  • [done] xml -> py
  • [interesting] psg code -> xml
  • add some picking templates for user
  • add some boilerplate's in output generated code
  • unit tests, pytest?

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 PySimpleGUIDesigner, version
Filename, size File type Python version Upload date Hashes
Filename, size PySimpleGUIDesigner- (25.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size PySimpleGUIDesigner- (18.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page