-1
I’m running into a very annoying problem trying to run the program. I looked at questions similar to mine on the site, but they didn’t give me much light. I need to do a job, but every time I create new files it’s always the same.
When I try to run the program it simply turns black, and I do not know the reason, because the console does not show or indicates any error.
My code . py is as follows::
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.core.window import Window
class Quadro(BoxLayout):
def __init__(self,**kwargs):
super().__init__(**kwargs)
Window.size = (500,500)
def criar(self):
n = self.ids.nome.text
c = self.ids.cidade.text
result = n + " mora em " + c
self.ids.resultado.text = result
class testeApp(App):
def build(self):
self.title = "Um App qualquer"
return Quadro()
meuObj = testeApp()
meuObj.run()
And this is my . Kv:
<Quadro>:
orientation: "vertical"
Label:
text: "digite um nome: "
TextInput:
text: ""
id: nome
Label:
text: "digite uma cidade"
TextInput:
text: ""
id: cidade
Button:
text: "gerar frase"
on_release: root.criar()
Label:
text: "aguardando resposta..."
id: resultado
Here I show what appears on the console and in the program window:
This code is basically a replica of what I had in a class (this program I had in class goes smoothly), so I beg for some help.