下面是我的代码: import qrcode
from tkinter import *
from tkinter import filedialog
root=Tk()
def choosefile():
global file
file=filedialog.askopenfile(mode='r',title='Choose a File')
choosefilebutton=Button(root,text='Choose a File',command=choosefile)
choosefilebutton.p