I have already tried to find an answer to my question, but I haven't been successful.
I do my first try with an GUI with tkinter on Python 3.6
I create a small example for you:
import tkinter as tk
import PyQt5.QtWidgets
RateFenstergrossh=0.75
RateFenstergrossb=0.75
app = PyQt5.QtWidgets.QApplication([]) # the bug doesn't occur without this line
screen_width = app.desktop().screenGeometry().width()
screen_height = app.desktop().screenGeometry().height()
def vp_start_gui():
global root
root = tk.Tk()
top = Toplevel1(root)
root.mainloop()
class Toplevel1:
def __init__(self, top=None):
top.geometry("+%d+%d"%(screen_width/2 - screen_width*RateFenstergrossb/2, screen_height/2 - screen_height*RateFenstergrossh/2))
self.Entry = tk.Entry(top)
self.Entry.pack(padx=20,pady=20)
if __name__ == '__main__':
vp_start_gui()
If you type some characters and try to delete them with backspace a small rectangle appears in the entry line. If you print this character the program prints <0x08>. If I do not use the package import PyQt5.QtWidgets
and the funktion PyQt5.QtWidgets.QApplication([])
the bug doesn't occur.
I do not really understand this bug. Maybe somebody can help me with this.