From cd72023def1275ac4590ebe7840affcea13c8ef2 Mon Sep 17 00:00:00 2001 From: BarsTiger Date: Mon, 24 Jan 2022 22:35:57 +0200 Subject: [PATCH] Initialized GUI dev --- uis/PyQtConverter.py | 15 +++++++++++++++ uis/horsy.ui | 31 +++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 uis/PyQtConverter.py create mode 100644 uis/horsy.ui diff --git a/uis/PyQtConverter.py b/uis/PyQtConverter.py new file mode 100644 index 0000000..28c91f0 --- /dev/null +++ b/uis/PyQtConverter.py @@ -0,0 +1,15 @@ +import os, easygui +from os.path import basename +slash = '/' + +start = easygui.buttonbox("Open .ui file to convert it", "Converter", ("Browse file", "Cancel")) + +if start == "Cancel": + exit() + +if start == "Browse file": + thisFile = easygui.fileopenbox(filetypes=["*.ui"]) + +filename = basename(thisFile)[:-3] + +os.system('python -m PyQt5.uic.pyuic -x ' + thisFile + " -o " + os.path.dirname(thisFile) + slash + filename + ".py") diff --git a/uis/horsy.ui b/uis/horsy.ui new file mode 100644 index 0000000..7bff7e1 --- /dev/null +++ b/uis/horsy.ui @@ -0,0 +1,31 @@ + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + 0 + 0 + 800 + 21 + + + + + + + +