Powered by Blogger.

Strategic insights into stocks, crypto, and wealth protection for 2026

UI파일을 Python 코드에서 import하는 방법

0 comments

import sys

from PyQt5.QtWidgets import *

from PyQt5 import uic   # ui 파일을 사용하기 위한 모듈 import

#UI파일 연결 코드

UI_class = uic.loadUiType("UI파일이름.ui")[0]

class MyWindow(QMainWindow, UI_class) :

    def __init__(self) :

        super().__init__()

        self.setupUi(self)

app = QApplication(sys.argv) 

Window = MyWindow() 

Window.show()

app.exec_()



No comments:

Post a Comment

Blogger 설정 댓글

Popular Posts

Strategic insights into stocks, crypto, and wealth protection for 2026

ondery

My Blog List

가장 많이 본 글

Contributors