[PyQt] Make a window with "Hello World"


Target

1. Create a window

2. print "Hello World" on the window


Source code


import sys

from PyQt5.QtWidgets import *


app = QApplication(sys.argv)

label = QLabel("Hello World")

label.show() 

app.exec_() 



Result


QT library is located in C:\Users\JC\Anaconda3\Lib\site-packages\PyQt5 in my windows machine








'Python' 카테고리의 다른 글

Anaconda Python  (0) 2017.02.02
[PyQt] Event Handling  (0) 2017.02.02
[PyQt] What is PyQt?  (0) 2017.02.02
Install PyCharm IDE  (0) 2017.02.02
[Python] print "Hello world"  (0) 2017.02.02