본문 바로가기
etc/프로그래밍

python PyQt5 vs Tkinter

by 칸타렌서 2019. 4. 1.

PyQt5 

from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QVBoxLayout
app = QApplication([])
window = QWidget()
layout = QVBoxLayout()
layout.addWidget(QPushButton('Top'))
layout.addWidget(QPushButton('Bottom'))
window.setLayout(layout)
window.show()
app.exec_()

Tkinter

import tkinter

window=tkinter.Tk()
window.title("AAAAAAAAAAA")
window.geometry("500x500")
window.resizable(False, False)
	
def button_click_test():
	label.config(text="clicked")

label = tkinter.Label(window, text="hello world")
label.pack()

button = tkinter.Button(window, overrelief="solid", width=15, command=button_click_test, repeatdelay=1000, repeatinterval=100)
button.pack()

window.mainloop()

 

notepad plugin

npp_save
c:\python37\python.exe $(FULL_CURRENT_PATH)

 

 

댓글