Initialized GUI dev
This commit is contained in:
15
uis/PyQtConverter.py
Normal file
15
uis/PyQtConverter.py
Normal file
@@ -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")
|
||||||
31
uis/horsy.ui
Normal file
31
uis/horsy.ui
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>MainWindow</class>
|
||||||
|
<widget class="QMainWindow" name="MainWindow">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>800</width>
|
||||||
|
<height>600</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>MainWindow</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="centralwidget"/>
|
||||||
|
<widget class="QMenuBar" name="menubar">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>800</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QStatusBar" name="statusbar"/>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
Reference in New Issue
Block a user