kivy-language

Kivy Camera on multiple screen

不羁的心 提交于 2020-06-01 07:41:05
问题 I'm trying to create a simples app in kivy that have two screen and i need it load the a custom camera in each screen dont need do in same time. I tryed load in gui.kv the cam in microscope widget and main widget, but's retorn me a erro self._buffer = frame.reshape(-1) AttributeError: 'NoneType' object has no attribute 'reshape' When i remove one of the cameras it work, but's i need the camera in both screen follow my code main.py import kivy from kivy.app import App from kivy.uix

Kivy Apk Buildozer : ReferenceError: weakly-referenced object no longer exists

*爱你&永不变心* 提交于 2020-05-24 03:56:05
问题 Can anyone tell me why my app is crashing. It's very strange that when i run my app for the first time it doesn't crash. but the next time i run it it crashes. I get something like this. i am using KIVYMD, KIVY, SOCKET, KIVY MAPVIEW , SQLITE3. below is the error which i get through buildozer logcat. 04-07 21:49:46.650 4622 4659 I python : [WARNING] [Base ] Unknown <android> provider 04-07 21:49:46.656 4622 4659 I python : [INFO ] [Base ] Start application main loop 04-07 21:49:48.162 4622

Kivy TextInput to be above Android keyboard, however rest of screen to stay where it is

巧了我就是萌 提交于 2020-05-15 19:15:05
问题 I am building a quiz game in Kivy, that has a TextInput option for users at the bottom of the screen. It's at the bottom because the clues for the answers are displayed at the top. The issue I am having is when I deploy my app to my phone, the Android on-screen keyboard pops up and blocks out nearly half my screen. I tried the softinput_mode in the Windows package, but this seems to push my entire screen up and so now, the top half of the screen is gone (and users can no longer see the clues)

Kivy TextInput to be above Android keyboard, however rest of screen to stay where it is

China☆狼群 提交于 2020-05-15 19:13:07
问题 I am building a quiz game in Kivy, that has a TextInput option for users at the bottom of the screen. It's at the bottom because the clues for the answers are displayed at the top. The issue I am having is when I deploy my app to my phone, the Android on-screen keyboard pops up and blocks out nearly half my screen. I tried the softinput_mode in the Windows package, but this seems to push my entire screen up and so now, the top half of the screen is gone (and users can no longer see the clues)

How to call a variable in .kv kivymd

狂风中的少年 提交于 2020-03-06 09:34:32
问题 I have a problem, that when i want to call a variable in the .kv gave me an error is it posible to call a variable like this: FloatLayout: MDCard: orientation: "vertical" size_hint: .43, .3 height: self.minimum_height pos_hint: {"x": .05, "y": .35} MDLabel: id: card text: self.data_ebay #here is the variable i want to be the text The variable has a text but when i run it, it gave me this error: AttributeError: 'MDLabel' object has no attribute 'app' File "E:\pythonf2\lib\site-packages\kivy

How to call a variable in .kv kivymd

你离开我真会死。 提交于 2020-03-06 09:33:08
问题 I have a problem, that when i want to call a variable in the .kv gave me an error is it posible to call a variable like this: FloatLayout: MDCard: orientation: "vertical" size_hint: .43, .3 height: self.minimum_height pos_hint: {"x": .05, "y": .35} MDLabel: id: card text: self.data_ebay #here is the variable i want to be the text The variable has a text but when i run it, it gave me this error: AttributeError: 'MDLabel' object has no attribute 'app' File "E:\pythonf2\lib\site-packages\kivy

Python/Kivy : Form submit using enter key

爱⌒轻易说出口 提交于 2020-02-23 08:16:02
问题 I am moving from one TextInput to another TextInput using enter key. I want to move from last TextInput to Button using enter key .When I press again enter key then should be call root.abc() function. Can someone tell me how to done it? test.py from kivy.uix.screenmanager import Screen from kivy.app import App from kivy.core.window import Window Window.clearcolor = (0.5, 0.5, 0.5, 1) Window.size = (300, 100) class User(Screen): def abc(self): print('Test') class Test(App): def build(self):

Python KivyMD: How can I make the toggle_nav_drawer() function work?

让人想犯罪 __ 提交于 2020-01-30 11:23:12
问题 I got a problem with my kv code here. I want to create a MDNavigationDrawer with a few NavigationDrawerIconButtons . The window shows up but when I click at the MDToolbar the program crashes and shows this Error Message. Traceback (most recent call last): File "C:/Users/path/to/my/file/main.py", line 189, in <module> KivyGUI().run() File "C:\Users\uname\Anaconda3\lib\site-packages\kivy\app.py", line 855, in run runTouchApp() File "C:\Users\uname\Anaconda3\lib\site-packages\kivy\base.py", line

How to duplicate blocks of widgets in kv file (lowercase-only rule)

荒凉一梦 提交于 2020-01-22 03:08:05
问题 I try to understand how kivy .kv files work, so I created a small application with a horizontial BoxLayout which contains three GridLayouts, as shown: my_widget: <my_widget@BoxLayout>: orientation: "horizontal" GridLayout: rows: 3 ToggleButton: Image: Label: GridLayout: rows: 3 ToggleButton: Image: Label: GridLayout: rows: 3 ToggleButton: Image: Label: No problem there, but since there are same blocks of widgets (GridLayouts) could they be duplicated? I tried something like: https://kivy.org

How to rotate two rectangle widgets independently on single screen in kivy?

淺唱寂寞╮ 提交于 2020-01-22 02:30:09
问题 I am learning programming in python and working on one simple gaming application in which I need to rotate two rectangles on click on them on single screen but what's happening is when I am clicking on one of them both the rectangles rotate along the origin of that rectangle that is being clicked but this is not the case with another rectangle, in fact its position is not also that that is supposed to be and when clicking on the assigned position(where that rectangle is not present) it gets