kivy

Raspberry Pi 7 inch Touchscreen rotate

◇◆丶佛笑我妖孽 提交于 2021-01-28 10:40:39
问题 I have a small problem: I would like using Raspberry PI 7 inch LCD on portrait (standing) mode. (Kivy application) I added on /boot/config.txt: lcd_rotate=2 and display_rotate=1 The display is OK, but touch screen not good! The touch not rotating 90 degrees. How I rotate touch screen 90 degrees? 回答1: Rotate official 7" Raspberry Touchscreen 1. install xinput : sudo apt-get install xinput 2. to rotate the screen, edit this file: sudo nano /boot/config.txt and add this line at the end: display

Raspberry Pi 7 inch Touchscreen rotate

人走茶凉 提交于 2021-01-28 10:38:13
问题 I have a small problem: I would like using Raspberry PI 7 inch LCD on portrait (standing) mode. (Kivy application) I added on /boot/config.txt: lcd_rotate=2 and display_rotate=1 The display is OK, but touch screen not good! The touch not rotating 90 degrees. How I rotate touch screen 90 degrees? 回答1: Rotate official 7" Raspberry Touchscreen 1. install xinput : sudo apt-get install xinput 2. to rotate the screen, edit this file: sudo nano /boot/config.txt and add this line at the end: display

Raspberry Pi 7 inch Touchscreen rotate

允我心安 提交于 2021-01-28 10:34:53
问题 I have a small problem: I would like using Raspberry PI 7 inch LCD on portrait (standing) mode. (Kivy application) I added on /boot/config.txt: lcd_rotate=2 and display_rotate=1 The display is OK, but touch screen not good! The touch not rotating 90 degrees. How I rotate touch screen 90 degrees? 回答1: Rotate official 7" Raspberry Touchscreen 1. install xinput : sudo apt-get install xinput 2. to rotate the screen, edit this file: sudo nano /boot/config.txt and add this line at the end: display

Kivy Error: No Screen with Name

岁酱吖の 提交于 2021-01-28 08:52:27
问题 I set up a Screen in a Kivy ScreenManager (myScreen is just a class that inherits Screen) class firstScreen(myScreen): def __init__(self,**kwargs): super(firstScreen, self).__init__(**kwargs) self.name = "first" self.add_widget(Button(on_release = switchScreens("second"))) I also set up a second screen: class secondScreen(myScreen): def __init__(self,**kwargs): super(secondScreen, self).__init__(**kwargs) self.name = "second" I then set up my ScreenManager: sm = ScreenManager() sm.add_widget

Numeric Input in Kivy with Python

给你一囗甜甜゛ 提交于 2021-01-28 07:04:57
问题 I am very new to Kivy, and have found an online example for a simple calculator here that I would like to try to modify using the Kivy examples ~/examples/keyboard/main.py. In that example is a numeric keyboard, but I can't seem to figure out how to get it to appear instead of the standard keyboard. Help or suggestions would be greatly appreciated. Here is what I have started with: from kivy.app import App from kivy.lang import Builder from kivy.uix.floatlayout import FloatLayout from kivy

python- Kivy Screen Manager within .py file

你。 提交于 2021-01-28 05:41:49
问题 I am building a multiple screen App with Kivy and I would like to use the ScreenManager to navigate between the multiple screens. I have seen examples and documentation for how to create the screens within a .kv file, but I want to know how to create them within the .py file. Problem: When I create the screen subclasses as shown below, my app window returns a blank screen. Question: What is the correct way to create the Screen subclasses within a .py file? Right now I have two Screen

Cannot get correct item selection from DropDown widget in Kivy

半腔热情 提交于 2021-01-28 05:27:45
问题 In my Kivy app, one of the text inputs triggers the opening of a DropDown widget when on_focus . The textinput is part of a custom BoxLayout IngredientRow which I dinamically add to the screen on the press of a button. What I want is to fill the textinput with the text of the button selected from the DropDown. This works for the first IngredientRow . However, when I add new rows, selecting an item from the DropDown in a row different from the first, will fill the textinput from the first row.

Kivy sdl2 - RuntimeError: b'Could not initialize EGL

*爱你&永不变心* 提交于 2021-01-28 05:13:36
问题 I try to run the following sample script on Windows 7 with OpenGL 1.1: from kivy.app import App from kivy.uix.label import Label class MyApp(App): def build(self): return Label(text='Hello world') if __name__ == '__main__': MyApp().run() and i receive the following error [INFO ] [Logger ] Record log in C:\Users\Admin.kivy\logs\kivy_20-03-09_20.txt [INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.2.0 [INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.2.0 [INFO ] [deps ]

Kivy Camera display is rotated -90 degrees

安稳与你 提交于 2021-01-27 19:40:23
问题 I am accessing my camera in android 4.4 using python with kivy framework. This is my simple code: from kivy.app import App from kivy.uix.camera import Camera from kivy.core.window import Window class CamApp(App): def build(self): return Camera(resolution= Window.size) CamApp().run() But when I ran my code, it displayed this: Ideally, it should look like this: It looks like the kivy Camera is displaying the output with a built in -90 degrees. Is this normal or a bug? Or should I rotate the

Browse an image file and display it in a kivy window

老子叫甜甜 提交于 2021-01-27 19:32:59
问题 I am a beginner in Kivy and trying to browse an image file using kivy fileChooser and then displaying it on the window. Bellow you find my code but it wouldn't do the task. It just displays '?PNG' on the console. Please, check this out with me ! import kivy from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.lang import Builder from kivy.uix.image import Image import os Builder.load_string(""" <MyWidget>: id: my_widget Button text: "open" on_release: my_widget.open