Tl;dr: How (Where can we get information) do we troubleshoot Tkinter at this system presentation layer? Surely the maintainers of Tkinter would have documented a guide somewhere. Any thoughts what could be causing this "wtf?" experience?
TAKE NOTE! To support future troubleshooting events, the objective is to understand the root cause so it can reproduced elsewhere, and then apply the fix.
PROBLEM:
The Checkbutton widget does not update, when clicking on the checkbox, on this specific Kubuntu KDE Plasma 5.18 machine configuration.
INVESTIGATIONS:
This issue did not occur in the following environments:
- Windows 8.1,
- VirtualBox with LiveCD Kubuntu 20.04 (Plasma 5.18),
- VirtualBox with LiveCD Kubuntu 20.10 (Plasma 5.19),
- Kubuntu 20.04 (XFCE on original machine).
Tests with other GUI frameworks works correctly.
- Kivy
- GTK version 3
- wxPython
NEXT STEPS:
- Search results does not really provide guides or issues related to this specific.
- Also ask advice on the python org discuss platform.
- Try to create a TCL test version.
SOURCE CODE FOR TEST:
from tkinter import *
class MyGUI:
def __init__(self, window):
self.var = IntVar()
self.c = Checkbutton(window,
text="Enable Tab",
variable=self.var,
command=self.cb)
self.c.pack()
def cb(self):
print("self.var is", self.var.get())
if __name__ == "__main__":
root = Tk()
gui = MyGUI(root)
root.mainloop()
OUTPUT:
>self.var is 1
>self.var is 0
>self.var is 1
SYSTEM SPECS:
Operating System: Kubuntu 20.04
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8
Kernel Version: 5.4.0-58-generic
OS Type: 64-bit
Processors: Intel i3 4 Core M350 2.27GHz
Memory: 7,6 GiB of RAM
Python 3.8.5
Tcl/Tk version 8.6