loading external UIs

  • hello guys... how do i load a figma file into PyQt5?

  • #!/usr/bin/python3
    import os
    import sys
    from PyQt5 import QtCore, QtGui, QtWidgets , uic
    LOCAL_DIR = os.path.dirname(os.path.realpath(__file__)) + "/"
    class Main(QtWidgets.QMainWindow):
        def __init__(self):
            self.ui = uic.loadUi(LOCAL_DIR + "main.ui", self)
    if __name__== '__main__':
        app = QtWidgets.QApplication([])
        gui = Main()

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.