I am new to python and trying to run a program with Gtk on Python 3.4 and Windows 7.
I installed Python 3.4, the GTK+ all-in-one-bundle for Windows and PyGObject (which your are apparently supposed to use with Python 3+ now).
However, I am always…
I write some simple program with Python and PyGObject. I wanted her to inform the user about the progress through the ProgressBar. I googled that this process should be a separate thread, otherwise the interface hold on, and now have some like this…
I use Python 3+PyGObjects+Gtk.Builder
I have some window, what I create from glade:
builder = Gtk.Builder()
builder.add_from_file("main.ui")
I create some widgets and add them(i see it in window):
switch = Gtk.Switch()
switch.set_name('test')
hBox…
This question has been asked before [here]. At the time, it was a bug, and a feature has been requested, later on it was fixed and supposedly it should work.
but in my case it still isn't.
I have been trying and googling for about a week, yet still,…
I am using a Gtk.Stack widget in PyGobject, and as i could not find any "tutorial" on how to use them, i supposed that each element of the Gtk.Stack has a name/tag.
And so i made a few elements and connected to the stack…
I am trying to build a graphical interface with python in GTK+/Pygobject, but i am having some trouble. Mainly with events.
What do i need? To execute a simple function whenever a button is clicked.
Sample code:
class Window(Gtk.Window):
def…
While running some older Python+GTK3 code under Ubuntu 14.04, the following deprecation warnings appeared:
PyGIDeprecationWarning: io_add_watch is deprecated; use GLib.io_add_watch instead
/usr/lib/python3/dist-packages/gi/overrides/GLib.py:655:…
I know that you need to subclass Gtk.DrawingArea in PyGObject in order to create a custom widget. You then connect the draw signal to a callback that looks like this:
def on_draw(drawing_area, cr):
# do something with cr
return False
To ask…
I'm trying to modify an XML attribute every time my program starts.
Basically, I'm creating a GUI with PyGObject, and I want the version number in the about box to automatically update.
The XML is as follows:
I've implemented a custom TreeModel in PyGI (GTK3) the following way (as suggested here
and here):
test.py
from gi.repository import Gtk
class Store(GObject.Object, Gtk.TreeModel):
def __init__(self):
self.data = [[i*j for i in…
I get an error
Couldn't find conversion for foreign struct 'cairo.Context' in ignored
All the research I've done online suggests that there is a missing package python-gi-cairo, or…
I was kindly directed to use GObject's "add_emission_hook" following a recent question on SO but I can't seem to find a usage example.
Does anyone have one to share, please?
I'm using Python 3 with pygobject and I have an IconView and would like the user to be able to start typing and the IconView will select the first match. This already works in the TreeView widget, interactive search, but is there anyway to get this…
I'm using OS X Mavericks with system Python 2.7.
I installed PyGObject, GTK+ and glade as I descripted below, but Python doesn't see gtk.glade module.
All libraries from Homebrew:
brew install libglade
brew install gtk+
brew install pygobject
Also,…
So if I use gst, I can run the following:
import gst
outs = gst.element_factory_list_get_elements(gst.ELEMENT_FACTORY_TYPE_SINK,gst.RANK_NONE)
And outs is now a list of gst.ElementFactory objects which each of type of GStreamer SINK I can use (e.g.…