This commit is contained in:
BarsTiger
2021-06-01 17:56:04 +03:00
parent 7c6690d9a2
commit 52c9edabe4
6 changed files with 93 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import os, easygui, time
from os.path import basename
from subprocess import *
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]
fileik = open('convert.bat', "w+")
fileik.write('python -m PyQt5.uic.pyuic -x ' + thisFile + " -o " + os.path.dirname(thisFile) + slash + filename + ".py")
fileik.close()
call('start convert.bat', shell=True)
time.sleep(1)
os.remove("convert.bat")