Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

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
Comment

load ui file pyqt5

from PyQt5 import QtWidgets, uic
import sys

class Ui(QtWidgets.QMainWindow):
    def __init__(self):
        super(Ui, self).__init__()
        uic.loadUi('basic.ui', self)
        self.show()

app = QtWidgets.QApplication(sys.argv)
window = Ui()
app.exec_()
Comment

PREVIOUS NEXT
Code Example
::  
::  
::  
:: Function to a button in tkinter 
::  
::  
Python ::  
::  
Python ::  
Python ::  
::  
::  
:: How to extract numbers from a string in Python? 
::  
::  
::  
::  
::  
::  
::  
Python ::  
::  
Python :: Not getting spanish characters python 
::  
::  
Python ::  
Python ::  
Python ::  
::  
Python ::  
ADD CONTENT
Topic
Content
Source link
Name
1+9 =