![]() |
Help requested handling longpress in PyGTK
Hi all,
I know Qt is what everybody uses now, but I've started developing an app in PyGTK and am quite enjoying it. However, I'm a bit stuck with trying to detect and handle longpresses on GTK TreeView rows. I have cobbled together code from Modrana (thanks MartinK!) with examples from around the web (mostly PyGTK doco). Basically I have connected the button-press-event and button-release-events for the treeview to two methods, and I've managed to get a context menu to display on a longpress on an item, but I'm having difficulty getting the menu to go away when the finger is lifted from the screen, and the menu also weirdly follows the finger around the screen as it moves. Can anybody recommend other PyGTK apps I should inspect for examples of longpress popup menus, or spare some time to look at my code and give some guidance? |
Re: Help requested handling longpress in PyGTK
Okay, so I found what I needed in gPodder - specifically, the widget.tap_and_hold_setup(menu) method.
Code:
menu = gtk.Menu() |
All times are GMT. The time now is 11:53. |
vBulletin® Version 3.8.8