PySimpleGUI / PySimpleGUI/PySimpleGUI
[Bug] table element in pysimpleguiqt dont show integer data from database sqlite3
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.8k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Type of Issues (Enhancement, Error, Bug, Question)
Hi this is my first time posting here sorry if i miss something ando sorry for my bad english
1 - Table element in pysimpleguiqt dont show integer data from database sqlite3
Operating System
Win10
Python version
3.8.3
PySimpleGUI Port and Version
Ports = tkinter, Qt, WxPython, Web
PySimpleGUI Version:
4.32.1
tkinter version:
8.6.9
Your Experience Levels In Months or Years
1.0_ Python programming experience
1.5_ Programming experience overall
no_ Have used another Python GUI Framework (tkinter, Qt, etc) previously (yes/no is fine)?
import sys
if sys.version_info[0] >= 3:
import PySimpleGUIQt as sg
else:
import PySimpleGUI27 as sg
import sqlite3
class ver_empleados:
base ="chinook.db"
def conexion (self,consulta,parametros = ()):
try:
con_base = sqlite3.connect(self.base)
cursor_base = con_base.cursor()
resultado = cursor_base.execute(consulta, parametros)
con_base.commit()
return resultado
except sqlite3.Error as error:
print("Error en conectar con la base de datos", error)
def empleados(self):
llamada_empleados = "SELECT * FROM Employee"
datos_empleados = self.conexion(llamada_empleados,)
ver_empleados = datos_empleados.fetchall()
return ver_empleados
def nombres_columnas(self):
con_base = sqlite3.connect(self.base)
cursor_base = con_base.execute("SELECT * FROM Employee")
nombres = list(map(lambda x: x[0], cursor_base.description))
return nombres
clase = ver_empleados()
datos_empleados = clase.empleados()
nombres = clase.nombres_columnas()
vista = [[sg.Frame("Empleados",[[sg.Table(values=datos_empleados, headings= nombres)]],)]]
ventana = sg.Window("Empleados",vista)
while True:
event,values = ventana.read()
if event == sg.WIN_CLOSED:
break
ventana.close()
sys.exit()

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the provided script against chinook.db, using the Employee query and sg.Table setup as the entry point. Inspect the PySimpleGUIQt table path for how fetched integer values are handled; done means integer Employee fields render in the table while the existing headings and rows remain usable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sqlite
- Domain
- databases, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100