이런 식으로 상단 타이틀에 원하는 아이콘을 넣을 수 있다. 윈도우는 잘 나오는데 MAC에서는 안 나온다... 코드 import sys from PyQt5.QtWidgets import QApplication, QWidget from PyQt5.QtGui import QIcon class MyApp(QWidget): def __init__(self): super().__init__() self.initUI() def initUI(self): self.setWindowTitle('Icon') self.setWindowIcon(QIcon('./files/logo.png')) self.setGeometry(300,300,300,200) self.show() if __name__ == '__main__': app..
코드 import sys from PyQt5.QtWidgets import QApplication, QWidget class MyApp(QWidget): def __init__(self): super().__init__() self.initUI() def initUI(self): self.setWindowTitle('My First Application') self.move(300, 300) self.resize(400, 200) self.show() if __name__ == '__main__': app = QApplication(sys.argv) ex= MyApp() sys.exit(app.exec_()) 해당 코드를 치면 창이 뜹니다. GUI 프로그램을 만드는 첫 번째 단계입니다. 설명 코드를 실행..