pygtk

How do I install PyGObject?

微笑、不失礼 提交于 2021-02-07 09:45:40
问题 I am trying to install PyGtk on windows 7 for Python 2.7, but when go to use pip to install PyGtk it says i need PyGObject (Go figure) so I installed the Visual C++ package for Python (I know I have the correct version) and tried using pip to install PyGObject but it keeps comming out with an error message saying that cairo.h is missing, and sure enough I check in the directory and it wasn't there. How on earth am I supposed to install PyGObject? 回答1: There's a quite long way, and it needs

Passing user data with glade/gtkbuilder

独自空忆成欢 提交于 2021-01-28 04:03:03
问题 I am a newbie of glade/pygtk. I am doing with some radio menu items. I created a signal handler on the signals tab, handler: on_group_menu_change user data: 7 what I expected is pass the int(or str) value 7 as user param to the handler. However, at startup, I found such warning: Could not lookup object 0 on signal group_changed of object radiomenuitem1 I know gtkBuilder treat 7 as an object reference. So how can I just pass an int/str to the handler ? 回答1: It seems this is still on the Glade

How to position an independent Window in an exact location on the screen?

感情迁移 提交于 2021-01-27 14:10:33
问题 I'm actually working on a relatively complex GTK+2 application. My application obviously have a main window; then I need to open a new "independent" Window. I need to place the "flying" window in a * precise position* of the screen, exactly at the vertices of a widget (a DrawingArea). I need to place the new window in a precise position of the screen, exactly at the vertices of a widget (a gtk.DrawingArea). So I thought the following algorithm: I get vertex coordinates of the DrawingArea

install pygtk for python 3.6.1 on Windows 10

不问归期 提交于 2020-12-30 18:13:59
问题 Since PIL.ImageGrab() gave me some problems, I read further into the topic and it seems that gtk is the better solution for making Screenshots. But I don't understand which packages are actually working and which are deprecated. trying pip install pygtk gives me ERROR: Could not import dsextras module: Make sure you have installed pygobject. pygobject doesn't exist, installing gobject doesn't help. I tried some variants of the module name like python3- or just 3 at the end, but I don't seem

install pygtk for python 3.6.1 on Windows 10

╄→尐↘猪︶ㄣ 提交于 2020-12-30 18:05:03
问题 Since PIL.ImageGrab() gave me some problems, I read further into the topic and it seems that gtk is the better solution for making Screenshots. But I don't understand which packages are actually working and which are deprecated. trying pip install pygtk gives me ERROR: Could not import dsextras module: Make sure you have installed pygobject. pygobject doesn't exist, installing gobject doesn't help. I tried some variants of the module name like python3- or just 3 at the end, but I don't seem

install pygtk for python 3.6.1 on Windows 10

六眼飞鱼酱① 提交于 2020-12-30 18:01:17
问题 Since PIL.ImageGrab() gave me some problems, I read further into the topic and it seems that gtk is the better solution for making Screenshots. But I don't understand which packages are actually working and which are deprecated. trying pip install pygtk gives me ERROR: Could not import dsextras module: Make sure you have installed pygobject. pygobject doesn't exist, installing gobject doesn't help. I tried some variants of the module name like python3- or just 3 at the end, but I don't seem

Manually scroll to a child in a Gtk.ScrolledWindow

隐身守侯 提交于 2020-07-22 06:07:51
问题 I'm developping a GTK app (in Python with PyGTK) and I need to scroll manually the Gtk.ScrolledWindow to a child it contains to show it in the screen. The ScrolledWindow contains a ListBox, which contains a lot of ListBoxRow. self.currencySwitcher = CurrencySwitcher(self) self.currencySwitcherBox = Gtk.ScrolledWindow(vexpand = True) self.currencySwitcherBox.add(self.currencySwitcher) CurrencySwitcher herits of Gtk.ListBox: class CurrencySwitcher (Gtk.ListBox): # ... I have a search system to