kivy

why is my kivy program not calling the function from another class?

偶尔善良 提交于 2021-01-29 10:23:36
问题 I think this is more of a python question, then a kivy question. class Keyboard is sharing a method from class GUI. I created an GUI instance called "self.a" to connected the 2 classes in class Keyboard. Also, I created a keyboard class instance, "self.key in class MainApp. when I use this method, "print ("Return button is pressed")" the "return" button was able to do the print statement. I understand why it works. When I use the "self.a.up()" in the method, the return button does not called

Kivy canvas.clear() not clearing the canvas

我的梦境 提交于 2021-01-29 10:13:46
问题 I have followed the widget tutorial for Kivy, but I cannot get the canvas to clear after painting (from their 'a simple paint app' tutorial), unless I resize the window after pressing the clear button. Please help. I am using kivy v1.10.1 and python v3.7.0. on windows 10 64-bit OS. Further, a widget in scatter mode leaves a trace when you drag to a new position, this also clears when resizing the window. See code below: from random import random from kivy.app import App from kivy.uix.widget

porting a python3 app from Linux to Android using kivy and bluepy

◇◆丶佛笑我妖孽 提交于 2021-01-29 10:11:05
问题 I created a simple app in python3 using Kivy for the UI and bluepy to access some Bluetooth BLE devices. Now I like to port the app to my Android phone. I saw there is somehow a port in Kivy to Android (https://github.com/kivy/python-for-android). But I am not sure if I can port my app with the bluepy dependency. So it comes down to the questions: 1st) is it possible to port a kivy and bluepy app to Android? 2nd) is there a tutorial showing how to do that? 回答1: You can package an Android app

Getting TypeError: object.__init__() takes no parameters Kivy

我只是一个虾纸丫 提交于 2021-01-29 09:16:25
问题 I developed an app with python and faced this problem: TypeError: object.__init__() takes no parameters My files are the following : Main.py : from kivy.app import App from kivy.lang import Builder from kivy.uix.label import Label from kivy.uix.scrollview import ScrollView from kivy.uix.boxlayout import BoxLayout from kivy.uix.screenmanager import Screen from kivy.uix.button import ButtonBehavior from kivy.uix.image import Image from kivy.uix.textinput import TextInput from kivy.uix.button

print the value selected in recycleview kivy

≯℡__Kan透↙ 提交于 2021-01-29 09:16:17
问题 I have a problem, when pressing on the list of the recyclerview i print the number of the index but i need print the value in the index code in below please any one can help me class SecondWindow(BoxLayout,Screen): myresult = ListProperty([("N_matricule", "Operateur")]) def insert_part(self): partnum = self.ids.Part_field part = partnum.text mycursor.execute( """SELECT OPERATION_DESCRIPTION FROM liste_des_operations WHERE PART_NO = %s""", (part,)) self.myresult = mycursor.fetchall() #for row

Getting TypeError: object.__init__() takes no parameters Kivy

廉价感情. 提交于 2021-01-29 09:16:10
问题 I developed an app with python and faced this problem: TypeError: object.__init__() takes no parameters My files are the following : Main.py : from kivy.app import App from kivy.lang import Builder from kivy.uix.label import Label from kivy.uix.scrollview import ScrollView from kivy.uix.boxlayout import BoxLayout from kivy.uix.screenmanager import Screen from kivy.uix.button import ButtonBehavior from kivy.uix.image import Image from kivy.uix.textinput import TextInput from kivy.uix.button

Kivy: Sizing Buttons to fit wrapped text within dropdown

和自甴很熟 提交于 2021-01-29 08:53:42
问题 I'm having issues building a Kivy dropdown with word wrapping enabled for the text, such that the button widgets size accordingly to accommodate the full text. I have followed guidance from the stack overflow thread below and similar blog post that is also linked. Wrapping the text of a Kivy Label https://blog.kivy.org/2014/07/wrapping-text-in-kivys-label/ The text wraps as expected, however as the text string gets longer, there is an increasing amount of "padding" above and below the text

Can't get kivy progress bar to update

一笑奈何 提交于 2021-01-29 08:36:29
问题 I've been building an app and I've been struggling to get the progress bar to update after each function is called. In the code below, my intent was to call a function then once that function finished running, I would update the self.load attribute with a new value. After assigning the self.load with a new value I want to pass it onto the progress bar in kivy so that its value would increase and it would be displayed on screen. import SEOProgram import time import os import kivy from kivy.app

Kivy - Unable to open device “/dev/input/event7” on Ubuntu, no permission

我怕爱的太早我们不能终老 提交于 2021-01-29 07:19:18
问题 I'm using Ubuntu 16.04 and every time I run any Kivy App (I'm new to both Ubuntu and Kivy), I get the message: [WARNING] [MTD] Unable to open device "/dev/input/event7". Please ensure you have the appropriate permissions. It works normally, I would just like to know why the message appears and if I can get rid of it. It doesn't matter if I run the app from PyCharm or Terminal. When I run it in Windows, everything is fine without this message. 回答1: This message appears because Kivy queries

Kivy - How to keep widgets that are added later when the app restarts

放肆的年华 提交于 2021-01-29 07:12:59
问题 I was wondering if there is any way to keep widgets that are added later during the application use. Whenever the app restarts, the build() function is called, and the widgets that have been added during the app usage disappear since they were not added in build() function. I want to keep these widgets in the restart in the same way the app keeps them in Pause mode. Thank you! 回答1: Here is a simple example of using an ini file with your Kivy App : import os import ast from kivy.app import App