Jump to content
Fórum Script Brasil
  • 0
Sign in to follow this  
Couzer

Duvida com código Python

Question

Olá bom dia a todos, preciso de uma ajuda, não estou entendendo por que quando mando executar o seguinte codigo a tela aparece apenas preta. Alguém pode me dar um auxilio? 

Estou iniciando meu primeiro software mobile, fico feliz se puderem ajuda, muito obrigado :D 

 

from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.button import Button
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.widget import Widget
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.image import Image
 
class Principal(App):
 
         def Build(self):
                  self.img1 = Image(source= "images/Logo.jpg",size_hint= (.5, .3),pos_hint={"center_x":.5, "center_y":.9}),
                  self.img2 = Image(source= "images/super.png",size_hint= (.99, .3), pos_hint={"center_x":.5, "center_y":.65}),
                  lb1 = Label(text="Usuário: ",font_size= '15sp',size_hint= (None,None),pos_hint= {"center_x":.40, "center_y":.43},bold= True),
                  lb2 = Label(text="Senha: ",size_hint= (None,None),font_size= "15sp",pos_hint={"center_x":.40, "center_y":.36},bold= True),
                  lb3 = Label(text="Cadatre-se!",size_hint= (None, None),font_size= "8sp",pos_hint= {"center_x":.5, "center_y":.3},bold= True),
                  lb4 = Label(text="Esqueceu sua senha?",size_hint= (None, None),font_size= "8sp",pos_hint= {"center_x":.5, "center_y":.32},bold= True)
 
                  layoutVideo = FloatLayout()
 
                  layoutVideo.add_widget(self.img1)
                  layoutVideo.add_widget(self.img2)
                  layoutVideo.add_widget(lb1)
                  layoutVideo.add_widget(lb2)
                  layoutVideo.add_widget(lb3)
                  layoutVideo.add_widget(lb4)
 
                  return layoutVideo
 
if __name__ == "__main__":
Principal().run()

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  



  • Forum Statistics

    • Total Topics
      148393
    • Total Posts
      643786
×
×
  • Create New...