Answers for "pyqt5 ui file to py"

3

how to convert ui to py pyqt5

# To convert .ui file to .py using pyqt5 module
>> pyuic5 -x main.ui -o main.py # pyQt5 version
>> pyuic4 -x main.ui -o main.py # pyQt4 version
Posted by: Guest on December-28-2020
2

how to load ui file in pyqt5

class Ui(QtWidgets.QMainWindow):
    def __init__(self):
        super(Ui, self).__init__() # Call the inherited classes __init__ method
        uic.loadUi('basic.ui', self) # Load the .ui file
        self.show() # Show the GUI
Posted by: Guest on November-22-2020

Python Answers by Framework

Browse Popular Code Answers by Language