#: import utils kivy.utils
<HomeScreen>:
FloatLayout:
canvas:
Color:
rgb: utils.get_color_from_hex('#87CEFA')
Rectangle:
size: self.size
pos: self.pos
GridLayout:
canvas:
Color:
rgb: utils.get_color_from_hex('#006400')
Rectangle:
size: self.size
pos: self.pos
# 2 images
row: 1
pos_hint: {'top': 1, 'left': 1}
size_hint: 1, 0.1
Image:
source: 'images/image.png'
Image:
source: 'images/image.png'
GridLayout:
# avatar icon and 2 other images
row: 1
pos_hint: {'top': 0.9, 'left': 1}
size_hint: 1, 0.2
Image:
source: 'images/image.png.png'
Image:
source: 'images/image.png.png'
Image:
source: 'images/image.png.png'
Label:
# the heading (big text above 3 big buttons)
pos_hint: {'top': 0.7, 'left': 1}
size_hint: 1, 0.1
text: 'Welcome to Sad Satan'
id: heading_label
GridLayout:
# the 3 big button in the middle
cols: 1
pos_hint: {'top': 0.6, 'left': 1}
size_hint: 1, 0.4
GridLayout:
# the 3 buttons on bottom
row: 1
pos_hint: {'top': 0.2, 'left': 1}
size_hint: 1, 0.2
ImageButton:
source: 'images/image.png.png'
on_release:
print('hello')
мой другой код (основной / другие файлы kv работают, и этот также, но эти картинки просто не go к их виджету)
мой код ошибки:
[WARNING] <kivy.uix.gridlayout.GridLayout object at 0x00000241BE92F3C8> have no cols or rows set, layout is not triggered.
[WARNING] <kivy.uix.gridlayout.GridLayout object at 0x00000241BE92F828> have no cols or rows set, layout is not triggered.
[INFO ] [GL ] NPOT texture support is available
[WARNING] <kivy.uix.gridlayout.GridLayout object at 0x00000241BE92FE48> have no cols or rows set, layout is not triggered.
[WARNING] <kivy.uix.gridlayout.GridLayout object at 0x00000241C6603E48> have no cols or rows set, layout is not triggered.
[WARNING] <kivy.uix.gridlayout.GridLayout object at 0x00000241C6645278> have no cols or rows set, layout is not triggered.
[WARNING] <kivy.uix.gridlayout.GridLayout object at 0x00000241C6645898> have no cols or rows set, layout is not triggered.
[WARNING] <kivy.uix.gridlayout.GridLayout object at 0x00000241BE92F3C8> have no cols or rows set, layout is not triggered.
[WARNING] <kivy.uix.gridlayout.GridLayout object at 0x00000241C6603E48> have no cols or rows set, layout is not triggered.
было бы неплохо, если бы вы дали мне ответ, почему это не работает в видео, где я узнаю, что все было правильно, может быть, это версия python, но я не знаю, надеюсь, вы дадите мне решение. Спасибо