質問編集履歴
1
新たに試したソースコードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -131,3 +131,53 @@
|
|
131
131
|
Renshu().run()
|
132
132
|
|
133
133
|
```
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
## 補足(新たに試したコード)
|
138
|
+
|
139
|
+
※
|
140
|
+
|
141
|
+
```
|
142
|
+
|
143
|
+
super(MyRoot, self).__init__(**kwargs)
|
144
|
+
|
145
|
+
```を使わなかった場合
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
```python
|
150
|
+
|
151
|
+
from kivy.app import App
|
152
|
+
|
153
|
+
from kivy.uix.boxlayout import BoxLayout
|
154
|
+
|
155
|
+
from kivy.uix.label import Label
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
class MyRoot(BoxLayout):
|
160
|
+
|
161
|
+
def __init__(self, **kwargs):
|
162
|
+
|
163
|
+
self.layout = BoxLayout()
|
164
|
+
|
165
|
+
self.lbl = Label(text='LLL')
|
166
|
+
|
167
|
+
self.layout.add_widget(self.lbl)
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
class Renshu(App):
|
172
|
+
|
173
|
+
def build(self):
|
174
|
+
|
175
|
+
L = MyRoot()
|
176
|
+
|
177
|
+
return L.layout
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
Renshu().run()
|
182
|
+
|
183
|
+
```
|