0

TEXT FIELD PROBLEMS

Cant seem to figure out a way to return data (string) into my text field, don't known if its because of the way I am importing and using a different class In my GUI code which was design using Qt designer. #below is a code snipet Obj = organizer() self.scrpe.clicked.connect(obj.scraping) # this is a button self.proxyfield.insertPlainText(obj.scraping) # this is the text field

14th Jul 2020, 8:37 PM
Kojo Gyan Kumi
Kojo Gyan Kumi - avatar
3 Respuestas
+ 1
Kojo Kumi please show us your code so we may be able to diagnose your code. Thanks
14th Jul 2020, 8:48 PM
BroFar
BroFar - avatar
+ 1
Maybe you take a look on my project pf loot generator. It is done with tkinter and show the output in a scrollable label. Here a other example. we have 2 fields. this fields are called: labels. it says what to do. the second field is hidden at start. we have 3 buttons. esc - quit the programm. I recomment strong to use/ build in at least the esc button. show - show entered text in a new label. new - clean all fields for new calculations. if input is done the button creates a new field. I did only a simple string concatenation but it shows, how the entered values are proceeded..
14th Jul 2020, 9:30 PM
Sven_m
Sven_m - avatar
0
from tkinter import * root = Tk() root.title("Demo") root.configure(bg = "black") info= Label( root, bg = "sky blue", text = "Enter text" ) info.pack(expand = "yes") demo = Entry(root) demo.pack(expand = "yes") def action(): result = "you entered: " + demo.get() global resultlabel resultlabel = Label(root, text = result) resultlabel.pack(side = "top") action_button = Button( root, bg = "sky blue", command = action, text = "show" ) action_button.pack( expand = "yes" ) def escape(): quit() esc = Button( text="Beenden", bg = "sky blue", command=escape ) esc.pack( side= "bottom", expand = "yes" ) def clear(): demo.delete(0, END) resultlabel.destroy() new_button = Button(root, text = "New calculation", bg = "sky blue", command = clear ) new_button.pack( side = "bottom", expand = "yes" ) mainloop()
14th Jul 2020, 11:07 PM
Sven_m
Sven_m - avatar