kivy

Kivy Gridlayout error: have no cols or rows set, layout is not triggered

自闭症网瘾萝莉.ら 提交于 2021-02-09 14:27:44
问题 I'm trying to create a basic Kivy app that has 4 labels in a GridLayout. Here's my Python code: from kivy.lang import Builder from kivy.app import App from kivy.uix.gridlayout import GridLayout from kivy.uix.label import Label class MyLayout(GridLayout): def __init__(self, **kwargs): Builder.load_file("mylayout.kv") super(MyLayout, self).__init__(**kwargs) class MyApp(App): def build(self): return MyLayout() if __name__ == '__main__': MyApp().run() Here is my mylayout.kv file: <MyLayout>:

Issue using kivy textinput's 'input_type' property

安稳与你 提交于 2021-02-08 23:38:26
问题 Hi im having issues with using the input_type property of kivy's textinput widget. The thing is i made two custom text input one i called StrText where i set input_type = 'text'. Then a second text input named NumText with input_type = 'number'. I tested this on my phone using kivy launcher, and noticed that once i tap on the NumText input and it brings a number keyboard, if i tap on the StrText, it brings the same number keyboard instead of a normal text keyboard. If you play with it a

Rendering text to a kivy canvas

情到浓时终转凉″ 提交于 2021-02-08 14:17:29
问题 I am trying to draw my own graphic within a kivy 'canvas'. For now I have a red or green rectangle which changes colour once per second, but I want to add a changing text label. After a little searching it appears that there isn't a "Text" Instruction which can be added to the canvas. I have found a few references to using a Label() widget as well as the canvas Instructions, but this does not seem ideal, and also I can't seem to get it to render more than once. Here's my object as it stands

python and kivy input text in first windows after click button print ( text ) as label ( update label ) in second widows

十年热恋 提交于 2021-02-08 11:37:49
问题 I want create simple app and I'm new in python, this app contain two windows , at first windows have one button (Save) and two input text. at the second windows we have four label. after click on button in first windows the label ( username 1 print here ) in second windows change according text input in first windows.enter image description here enter image description here when I run my code the label not change, any one can help me what is wrong. python code from kivy.app import App from

Execution failed for task ':packageDebug' - in buildozer

僤鯓⒐⒋嵵緔 提交于 2021-02-08 11:15:45
问题 I'm having an error when, I tried to create an .apk file using buildozer. I have put tensorflow, keras, numpy in requirements (.spec file). However when I try to compile I receive this error: [DEBUG]: Unable to strip library '1' due to error /home/.../.buildozer/android/platform/android- ndk-r19c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm- linux-androideabi-strip returned from '/home/.../Desktop/Sign/.buildozer/android/platform/build- armeabi- v7a/dists/signapp_

Execution failed for task ':packageDebug' - in buildozer

℡╲_俬逩灬. 提交于 2021-02-08 11:14:22
问题 I'm having an error when, I tried to create an .apk file using buildozer. I have put tensorflow, keras, numpy in requirements (.spec file). However when I try to compile I receive this error: [DEBUG]: Unable to strip library '1' due to error /home/.../.buildozer/android/platform/android- ndk-r19c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm- linux-androideabi-strip returned from '/home/.../Desktop/Sign/.buildozer/android/platform/build- armeabi- v7a/dists/signapp_

How to deploy a PyCharm project with Kivy and mapview?

半城伤御伤魂 提交于 2021-02-08 10:25:12
问题 I want to deploy a Python Project with Kivy and a MapView. I develop with PyCharm and when I run my project with it, everything works well. I also tried to compile and run my project with the python IDLE, it also works good ! I followed the instructions of PyInstaller (https://www.pyinstaller.org/#pyinstaller-quickstart) and the folders were created. The problem is that my .exe file doesn't works... A cmd window is opened but it's immediately closed.. If you need more explanation, just let me

Refresh / Reload FileChooser

℡╲_俬逩灬. 提交于 2021-02-08 07:31:57
问题 Currently I'm working with FileChooser a lot and I didn't find any mention of refreshing the widget in the docs. The widget is awesome, but if someone wants to refresh shown files, a movement from current directory is necessary to refresh files. The problem is when you have a single directory as a rootpath and inside are only files, therefore no such movement is possible. My question was how to refresh the widget if I want to avoid any wasteful removing/adding of FileChooser and do it as

Refresh / Reload FileChooser

ぐ巨炮叔叔 提交于 2021-02-08 07:30:54
问题 Currently I'm working with FileChooser a lot and I didn't find any mention of refreshing the widget in the docs. The widget is awesome, but if someone wants to refresh shown files, a movement from current directory is necessary to refresh files. The problem is when you have a single directory as a rootpath and inside are only files, therefore no such movement is possible. My question was how to refresh the widget if I want to avoid any wasteful removing/adding of FileChooser and do it as

How to change popup color in kivy

喜欢而已 提交于 2021-02-08 06:57:21
问题 In Kivy, Popup appears in grey color, what should be changed to make it red color My popup code: class MyPopup(Popup): def show_popup(self): content = BoxLayout(orientation="vertical") content.add_widget(Label(text="Game Over", font_size=20)) mybutton_cancel = Button(text="Cancel", size_hint_y=None) content.add_widget(mybutton_cancel) mypopup = Popup(content = content, title = "oops", auto_dismiss = False, size_hint = (.5, .5)) mybutton_cancel.bind(on_release=mypopup.dismiss) mypopup.open() I