Powered by Blogger.

Welcome id7004e with info

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_()



댓글 없음:

댓글 쓰기

Blogger 설정 댓글

Popular Posts

Welcome id7004e with info

ondery

내 블로그 목록

가장 많이 본 글

기여자