kivy

How to update progressbar using Clock Object with Multithreading in kivy-python?

核能气质少年 提交于 2021-02-18 17:46:47
问题 I am making an app in kivy for that i am using linux. i am getting a problem to update the progress bar gui using clock object with multithreading in python-kivy. i am using both files .kv & .py file run the app. my main.py file: from kivy.app import App from kivy.uix.label import Label from kivy.uix.boxlayout import BoxLayout from kivy.uix.progressbar import ProgressBar from kivy.uix.button import Button from kivy.uix.popup import Popup from kivy.clock import Clock import sys, threading, os,

How to add for each screen an own .py and .kv file?

独自空忆成欢 提交于 2021-02-18 15:03:49
问题 I want to have a seperate .py and .kv file for each sreen. Over the ScreenManager in main.py/main.kv the screen should be selected. The design should be loaded from the file screen_X.kv and the classes etc. should be loaded from the file screen_X.py. Screens: Screen 1 Screen 2 Screen 3 Files: (main.py) (showcase.kv) screen_1.py screen_1.kv screen_2.py screen_2.kv screen_3.py screen_3.kv This makes the program can be easily extended. How can I achieve this? With this code I have seperated .kv

Pause a python script until an event occurs without hanging/blocking the GUI

妖精的绣舞 提交于 2021-02-18 12:48:06
问题 Trying to migrate from PyQt with Kivy and I cant even imagine a solution for this. I have thousands of lines of code that use Qt's dialogues for text input. That is, when their line of code is reached, they 'stop' the script until the "ok" button is pressed, so they can return the text input. Kivy doesnt have that functionality, so ideally, when the program needs user input, the "ok" button would call for the next function to run. Therefore I must replace all the current calls to a PyQt

Convert a kivy texture to opencv image

浪尽此生 提交于 2021-02-11 17:18:06
问题 I am trying to convert my kivy texture to an image format so that i can process it using opencv (cv2). I tried reading the texture using read() and using cv2.imread() but neither worked. I also looked into converting the ubyte texture into a string but got nowhere. kivy camera texture -> format that i can process using cv2 something like MyVariable = someid.texture #do something to format of MyVariable so that it is an 'image' Newvar = MyVariable.read() #cv2 processing... EDIT: Ok so i got

Convert a kivy texture to opencv image

不羁的心 提交于 2021-02-11 17:17:59
问题 I am trying to convert my kivy texture to an image format so that i can process it using opencv (cv2). I tried reading the texture using read() and using cv2.imread() but neither worked. I also looked into converting the ubyte texture into a string but got nowhere. kivy camera texture -> format that i can process using cv2 something like MyVariable = someid.texture #do something to format of MyVariable so that it is an 'image' Newvar = MyVariable.read() #cv2 processing... EDIT: Ok so i got

Convert a kivy texture to opencv image

心已入冬 提交于 2021-02-11 17:09:51
问题 I am trying to convert my kivy texture to an image format so that i can process it using opencv (cv2). I tried reading the texture using read() and using cv2.imread() but neither worked. I also looked into converting the ubyte texture into a string but got nowhere. kivy camera texture -> format that i can process using cv2 something like MyVariable = someid.texture #do something to format of MyVariable so that it is an 'image' Newvar = MyVariable.read() #cv2 processing... EDIT: Ok so i got

Kivy GridLayout Error : have no cols or rows set, layout is not triggered

≡放荡痞女 提交于 2021-02-11 16:50:40
问题 I'm trying to make a simple app that takes name, grade, language (just for practice). Here's the Code: import kivy from kivy.app import App from kivy.uix.label import Label from kivy.uix.gridlayout import GridLayout from kivy.uix.textinput import TextInput from kivy.uix.button import Button class Mylays(GridLayout): def __init__(self,**kwargs): super(Mylays,self).__init__(**kwargs) self.top_grid = GridLayout() # Widget above main widget to hold all text and input boxes. self.cols = 2 # no.of

How to remove dynamically added items in Kivy

好久不见. 提交于 2021-02-11 15:54:32
问题 I've asked in past questions how to add buttons dynamically. I know how to add dynamically, but I don't know how to remove a button I've added. I want to make sure that pressing RemoveButton removes the button that was pressed, as shown in the image below. The code is as follows. I don't know how to add a command to a dynamically added button. #-*- coding: utf-8 -*- from kivy.config import Config from kivy.uix.button import Button Config.set('graphics', 'width', 300) Config.set('graphics',

How to remove dynamically added items in Kivy

99封情书 提交于 2021-02-11 15:54:22
问题 I've asked in past questions how to add buttons dynamically. I know how to add dynamically, but I don't know how to remove a button I've added. I want to make sure that pressing RemoveButton removes the button that was pressed, as shown in the image below. The code is as follows. I don't know how to add a command to a dynamically added button. #-*- coding: utf-8 -*- from kivy.config import Config from kivy.uix.button import Button Config.set('graphics', 'width', 300) Config.set('graphics',

Kivy: Modifying a child widget of another separate class

眉间皱痕 提交于 2021-02-11 15:21:45
问题 im currently looking into kivy to start with crossplatform development. i have a bit of python experience (but basic) and now wanted to code a little game in kivy to get into. i probably wont finish this but i like learning stuff while doing it with something im intrested in. Anyway my "App" is supposed to be seperated in two seperate "screens" the top one is only used for displaying stuff and the all interactive stuff is controlled from the bottom "screen". Now i want to display some text in