首页上一页 1 下一页尾页 1 条记录 1/1页
pyqt如何像tkinter那样获取界面的值 直接的标签要怎么设置 这个怎么用pyqt实现
发表在Python图书答疑
2021-02-02
《PyQt5&Python游戏开发》第16章 学生成绩管理系统(PyQt5+MySQL+PyMySQL模块实现)
是否精华
是
否
版块置顶:
是
否
tkinter * pandas pd numpy np root=Tk() root.title() root.geometry() ll1 = Label(root, =).place(=,=) sl1_text = DoubleVar() sl1= Entry(root, =sl1_text).place(=,=) sl1_text.set() lul1 = Label(root, =).place(=,=) ul1_text = DoubleVar() ul1= Entry(root, =ul1_text).place(=,=) ul1_text.set() li1 = Label(root, =).place(=,=) si1_text = DoubleVar() si1= Entry(root, =si1_text).place(=,=) si1_text.set() lts1 = Label(root, =).place(=,=) tss1_text = DoubleVar() tss1 = Entry(root, =tss1_text).place(=,=) tss1_text.set() lt1 = Label(root, =).place(=,=) t1_text = IntVar() t1= Entry(root, =t1_text).place(=,=) t1_text.set() lc1 = Label(root, =).place(=,=) c1_text = DoubleVar() c1 = Entry(root, =c1_text).place(=,=) c1_text.set() lr1 = Label(root, =).place(=,=) r1_text = DoubleVar() r1= Entry(root, =r1_text).place(=,=) r1_text.set() lt2 = Label(root, =).place(=,=) t2_text = IntVar() t2= Entry(root, =t2_text).place(=,=) t2_text.set() lc2 = Label(root, =).place(=,=) c2_text = DoubleVar() c2 = Entry(root, =c2_text).place(=,=) c2_text.set() lr2 = Label(root, =).place(=,=) r2_text = DoubleVar() r2= Entry(root, =r2_text).place(=,=) r2_text.set() lt3 = Label(root, =).place(=,=) t3_text = IntVar() t3= Entry(root, =t3_text).place(=,=) t3_text.set() lc3 = Label(root, =).place(=,=) c3_text = DoubleVar() c3 = Entry(root, =c3_text).place(=,=) c3_text.set() lr3 = Label(root, =).place(=,=) r3_text = DoubleVar() r3= Entry(root, =r3_text).place(=,=) r3_text.set() lt4 = Label(root, =).place(=,=) t4_text = IntVar() t4= Entry(root, =t4_text).place(=,=) t4_text.set() lc4 = Label(root, =).place(=,=) c4_text = DoubleVar() c4 = Entry(root, =c4_text).place(=,=) c4_text.set() lr4 = Label(root, =).place(=,=) r4_text = DoubleVar() r4= Entry(root, =r4_text).place(=,=) r4_text.set() lt5 = Label(root, =).place(=,=) t5_text = IntVar() t5= Entry(root, =t5_text).place(=,=) t5_text.set() lc5 = Label(root, =).place(=,=) c5_text = DoubleVar() c5 = Entry(root, =c5_text).place(=,=) c5_text.set() lr5 = Label(root, =).place(=,=) r5_text = DoubleVar() r5= Entry(root, =r5_text).place(=,=) r5_text.set() lt6 = Label(root, =).place(=,=) t6_text = IntVar() t6= Entry(root, =t6_text).place(=,=) t6_text.set() lc6 = Label(root, =).place(=,=) c6_text = DoubleVar() c6 = Entry(root, =c6_text).place(=,=) c6_text.set() lr6 = Label(root, =).place(=,=) r6_text = DoubleVar() r6= Entry(root, =r6_text).place(=,=) r6_text.set() lt7 = Label(root, =).place(=,=) t7_text = IntVar() t7= Entry(root, =t7_text).place(=,=) t7_text.set() lc7 = Label(root, =).place(=,=) c7_text = DoubleVar() c7 = Entry(root, =c7_text).place(=,=) c7_text.set() lr7 = Label(root, =).place(=,=) r7_text = DoubleVar() r7= Entry(root, =r7_text).place(=,=) r7_text.set() dit_Sample=[] dit_Time=[] dit_C_C0=[] dit_RSD=[] dit_5=[] dit_6=[] dit_7=[] dit_Name=[] dit_result=[] dit_ul=[] dit_sl=[] dit_si=[] dit_Ts=[] on_click(): Ul=ul1_text.get() dit_ul.append(Ul) Sl=sl1_text.get() dit_sl.append(Sl) Si=si1_text.get() dit_si.append(Si) Ts=tss1_text.get() dit_Ts.append(Ts) T1 = t1_text.get() dit_Sample.append(T1) C1 = c1_text.get() dit_Sample.append(C1) R1 = r1_text.get() dit_Sample.append(R1) T2 = t2_text.get() dit_Time.append(T2) C2 = c2_text.get() dit_Time.append(C2) R2 = r2_text.get() dit_Time.append(R2) T3 = t3_text.get() dit_C_C0.append(T3) R3 = r3_text.get() dit_C_C0.append(R3) C3 = c3_text.get() dit_C_C0.append(C3) T4 = t4_text.get() dit_RSD.append(T4) C4 = c4_text.get() dit_RSD.append(C4) R4 = r4_text.get() dit_RSD.append(R4) T5 = t5_text.get() dit_5.append(T5) C5 = c5_text.get() dit_5.append(C5) R5 = r5_text.get() dit_5.append(R5) T6 = t6_text.get() dit_6.append(T6) C6 = c6_text.get() dit_6.append(C6) R6 = r6_text.get() dit_6.append(R6) T7 = t7_text.get() dit_7.append(T7) C7 = c7_text.get() dit_7.append(C7) R7 = r7_text.get() dit_7.append(R7) (dit_Sample) (dit_Time) (dit_C_C0) (dit_RSD) (dit_Ts) dit_result_1=[dit_sl]+[dit_ul]+[dit_si]+[dit_Ts] (dit_result_1) test = pd.DataFrame(=, =dit_result_1) test.to_csv(+ () + ,=,=) f = (f, ) : dit_result=[dit_sl]+[dit_ul]+[dit_si]+[dit_Ts]+[dit_Sample]+[dit_Time]+[dit_C_C0]+[dit_RSD]+[dit_5]+[dit_6]+[dit_7] test = pd.DataFrame(=, =dit_result) test.to_csv(+ () + ,=,=) Button(root,=,=on_click).place(=,=) root.mainloop()