Posts

Showing posts with the label kivy

Kivy Video Player is not working on Raspberry 3B+

Image
Clash Royale CLAN TAG #URR8PPP Kivy Video Player is not working on Raspberry 3B+ I just installed Rasbian Stretch and Kivy on my RPI3+ . My application work properly just videos are not playing. Rasbian, kivy and gstreamer are up to date. My application and video were working on KivyPie 0.9b without any problem. RPI3+ KivyPie 0.9b Does kivy has any config for video playing on manual installation of Rasbian? kivy Output logs: [INFO ] [MTD ] rotation set to 0 [WARNING] [Image ] Unable to load image [ERROR ] [Image ] Error loading texture ./data/images/welcome.mp4 [ERROR ] [VideoGstplayer] GStreamer encountered a general supporting library error. [ERROR ] [VideoGstplayer] GStreamer encountered a general supporting library error. [ERROR ] [VideoGstplayer] Internal data stream error. By clicking "Post Your Answer", you acknowledge that you have read our updated terms of servi...

Python Kivy: bind a command inside popup executes command

Image
Clash Royale CLAN TAG #URR8PPP Python Kivy: bind a command inside popup executes command I want to have a popup for confirming that the user really wants to quit the app. Now when I try to bind commands to the two buttons, I can only add the dismiss directly inside the function, not via a callback. That may be ok. But I can only call my closing routine through a callback, not inside the function. When I bind quit_app() inside this function it gets directly executed when opening the popup. Why? It just should bind, not execute. class pop(): def callback(instance): if instance.id == 'quit': aempApp.quit_app(aempApp, 1) def up(self): print('popup') qbutton = Button(text='Quit', id='quit') abutton = Button(text='Return to Program', id='return') blayout = BoxLayout() blayout.add_widget(qbutton) blayout.add_widget(abutton) self.popup = kivy.uix.popup.Popup(ti...

Kivy on Raspberry: Cursor is outside of window

Image
Clash Royale CLAN TAG #URR8PPP Kivy on Raspberry: Cursor is outside of window I am developing a GUI on my RaspberryPi 3 using Python3 and Kivy 1.11.0dev. The GUI is working, it is running in fullscreen after start (as far a I know since Kivy 1.9.x it is not possible to run a Kivy app as a window) and the mouse cursor is visible. The only problem now is that the user can move the mouse out of the visible area if he goes too far to the left, right, up or down. If this happens, it is difficult to get the cursor back to the visible area. I tried a lot to prevent that or to take the cursor back to window automatically but without success. From similar posts I tried things like this: Window.bind(on_cursor_leave=self.on_leave) def on_leave(self, *args): if self.hold: print('Cursor leaved Window') # call api calls here I also tried to grab the mouse Window.bind(grab_mouse=self.on_leave) Does anybody have a solution for putting the cursor back to the visible area after leavi...

In Kivy, is there a way to dynamically change the shape of a texture?

Image
Clash Royale CLAN TAG #URR8PPP In Kivy, is there a way to dynamically change the shape of a texture? I'm working on a scientific visualization tool using Kivy in which I display a set of 2D data to the user. Essentially, I create a texture with the same size as my data set using something like my_texture = Texture.create(size=(my_data_x, my_data_y)) . I use my_texture.blit_buffer(Data_set) to blit it onto the canvas and display it and it all works great. The problem is: I want to allow the user to be able to change the size of the data set while the program is running. Since the data size is changing, I need to have a texture that also has the new size. I've tried reassigning the my_texture variable to a newly created texture, but what's actually being shown on the screen is the texture right before the change. my_texture = Texture.create(size=(my_data_x, my_data_y)) my_texture.blit_buffer(Data_set) my_texture So my question is: is there a way to appropriately create text...