28 lines
570 B
Python
Executable File
28 lines
570 B
Python
Executable File
import tkinter as tk
|
|
import pyqrcode
|
|
|
|
|
|
def run(link):
|
|
window = tk.Tk(className="navpoint")
|
|
window.title("Navpoint")
|
|
window.resizable(width=False, height=False)
|
|
|
|
label = tk.Label(window, text="QR code here...")
|
|
label.pack()
|
|
|
|
image = tk.BitmapImage(
|
|
data=pyqrcode.create(link).xbm(scale=int(window.winfo_fpixels("2m")))
|
|
)
|
|
image.config(background="white")
|
|
image.config(foreground="black")
|
|
|
|
label.config(image=image)
|
|
|
|
try:
|
|
window.iconbitmap("icon.ico")
|
|
except tk.TclError:
|
|
pass
|
|
|
|
|
|
window.mainloop()
|