I'm trying to implement the Heigh-for-width Geometry Management in GTK with Python for my custom Widget. My widget is a subclass from Gtk.DrawingArea and draws some parts of an Image.
As I understood the GTK Docs (link above) I have to implement the…
I want to have a dialog window where some buttons close the dialog and others don't. The way I do this is by using the response signal from the Gtk.Dialog to call emit_stop_by_name('response') on the dialog. (If someone knows of a better way of…
I'm currently learning GTK+ via PyGobject and need something like a canvas. I already searched the docs and found two widgets that seem likely to do the job: GtkDrawingArea and GtkLayout. I need a few basic functions like fillrect or drawline ... In…
python 3.2.2
gtk3 3.2.2
python-gobject 3.0.2
I'm trying to display a GUI and do some work in the background. As I understand it should look something like this:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import time
from threading import…
I've been trying to install PyGObject using a variety of methods. First, using apt-get but that only installs it for Python 2.x. Next I attempted to compile it myself but I have been having problems getting it to compile for Python 3.
Does anyone…
I want to popup a context menu when the user right-clicks on the header row of a Gtk.TreeView. In GTK3, Gtk.TreeViewColumn has a get_button() method, which makes this easy; simply attach the menu to the button and connect it to a 'clicked' event.…
I have a GUI with a progressbar. It should show the progress of the work a second thread does. I would like to have something like an event the thread can send to the GUIs progressbar immediatly on each step of the work. But I don't see how this…
I'm developing a GUI with PyGObject and am trying to style all the entry widgets. From this post I get the impression that I should be able to create a CSS style that would apply to all GtkEntry objects, but for some reason it's not working for me…
I have a Gtk.TreeView here. Most but not all of the items should be able to be dragged & dropped. In this example the first item should not be able to be dragged & dropped but it should be selectable.
How can I realize this? Maybe I have to use the…
I accidentally deleted 'pyGObject' package from python3.6 interpreter. After trying to reinstall I get the following error message.
C:\WINDOWS\system32>pip install pygobject
Collecting pygobject
Using cached PyGObject-3.28.2.tar.gz
Collecting…
That's the basic idea.
I couldn't understand them while reading about all this in python's documentation. There's simply too much of it to understand it.
Could someone explain me how to get a working progress bar with a multi-threaded(or…
I have coded something with an asyncio loop:
loop = asyncio.get_event_loop()
# bla coroutines
loop.run_forever()
and now, someone gives to me a part of code using a GObject.MainLoop()
l = GObject.MainLoop()
# functions using gi.repository I cannot…
I have a very simple PyGObject application:
from gi.repository import Gtk, Gdk
class Window(Gtk.Window):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.set_border_width(5)
self.progress =…
I understand the what are the arguments for the functions gtk_builder_new_from_file or gtk_builder_new_from_string but I struggle a little to see what is a resource path like:
GtkBuilder *
gtk_builder_new_from_resource (const gchar…
I am using Python 3 and Gtk+ 3.
I have a list of colors stored in a Gtk.ListStore. I want to display these colors as Gtk.ColorButton with a Gtk.CellRenderer so that the users would be able to view the colors and also change the colors too. My…