I have a custom Gtk widget like MyWidget defined in the code example below:
import gc
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
class MyWidget(Gtk.Button):
def __init__(self, **kwargs):
…
this is the error i am getting while uploading my project to heroku.
remote: running build_ext
remote: Package gobject-introspection-1.0 was not found in the pkg-config search path.
remote: Perhaps you should add the…
I just started using PyGI (on Ubuntu Natty), although I have never used pygtk before.
I have used wnck in a wxPython program though, and it was easy enough to get a list of currently opened windows. From PyGI, the window list is always…
The pygtk signal documentation is pretty clear about signals creation, but I could not create a signal that doesn't take parameters.
What I want is to define (like in the example):
class MyGObjectClass(gobject.GObject):
__gsignals__ = {
…
I have been building an application on Linux using python pygobject, and now I need to distribute it on Windows.
I first installed pygobject via msys2 (as per the official pygobject documentation)
Now, using msys2/mingw32, I can run my program…
I am integrating gstreamer and pocketsphinx on mac using python 3.6; however, the first line of code, from gi import pygtkcompat, raises an error.
The command:
python3 demoapp_chinese.py
returns
Traceback (most recent call last):
File…
I have an application in Python Gtk. I have my main Application class in my main file. I then have all my dialogs in a different file. I need to be able to pass/return custom data from the dialog to the main application class other than the standard…
I cannot figure out how to handle the notify::active signal of a Gtk.Switch. I'm working with the MVC architecture (pattern) suggested here.
The error I got is this:
TypeError: _on_switch_serial_toggled() missing 1 required positional argument:…
I'm trying to install PyGObject on a Python2.7 environment in PyCharm which fails with the following details:
Running setup.py clean for PyGObject
Failed to build PyGObject
Installing collected packages: PyGObject
Running setup.py install for…
My sample code below creates a 2 row x 10 column Grid. The len() of the Grid seems to print the number of widgets within, not the row or column count. How can I get the column count?
import gi
gi.require_version("Gtk", "3.0")
from gi.repository…
I am trying to get entry completion to work with Gtk on Python 3, but I seem to miss some points when using Glade to construct the interface.
When using a layout based on a Glade file, I get a list of suggestions, but cannot read them since the…
Short version: What CSS selector can be used to style the background of a GTK TreeView header?
Long version: I've tried treeview header, treeview header .button, .button, button, label, GtkTreeView header, header and * as selectors for the header…
I'm trying to convert a pygtk library called etk.docking to pygobject. As part of this I have a Gtk.Container class that has child properties defined in a __gchild_properties__ dictionary. These object properties that are not specific to either the…
I've added placeholder on Entry object:
self._widget = Gtk.Entry()
self._widget.set_placeholder_text("Enter your name")
Now I want to add placeholder on TextView object, but I didn't find any method for it:
self._widget = Gtk.TextView()
So because I have the unity-gtk-module installed, all gtk-applications export their menu over the dbus SessionBus. My goal is to extract a list of all available menu entries. I've already implemented this with the help of pydbus, but for some…