import tkinter as tk import random import threading import time from PIL import Image,ImageTk from pygame.examples.cursors import image from 二维码生成器 import text_input class MovingLabel(threading.Thread): def __init__(self,window,text): threading.Thread.__init__(self) self.text=text self.label=tk.label(window,image=kuang,text=self.text,compound="center",font=("黑体",20),fg="white",width=190,height=45) self.label.place(x=800,y=random.randint(10,550)) def run(self): x=800 while x>-200: x-=2 self.label.place(x=x) time.sleep(0.02) self.label.destroy() def send(): text=e1.get()