I'm retrieving a JPEG from gphoto2, creating a Gio stream from the data and then creating a Pixbuf from the stream:
import gphoto2 as gp
from gi.repository import Gio, GdkPixbuf
camera = gp.Camera()
context = gp.Context
camera.init(context)
file =…
I am trying to implement drag-and-drop in a Gtk TreeView using a JSON string to serialize (am I using that word right?) the information. But when I use the standard approach I get an error message. Also the string I send arrives as bytes for some…
Is there a good way of pasting items after or below an item in a Gtk TreeView. Is it even possible to do that with one function? I made this self-contained example, but I am not sure what best-practices for this behavior should be. Is there maybe a…
I'm trying to add a toggle field in an filtered model for pygobjects. I used the code from the tutorial and enhanced to add toggle renderer, but as soon as I click in a filtered list the toggles are rendered wrong.
Assume you have a unfiltered…
I am pretty new to python. Please correct me if I show stupidity.
So I am trying to run the following code:
from gi.repository import Gtk
class LisaMainWindow:
def on_LisaMainWindow_destroy(self, object, data=None):
print ("quit with…
I found that code on the Internet :
#!/usr/bin/env python3
from gi.repository import Gtk
def popup_menu(icon, button, time):
menu = Gtk.Menu()
menuitemAbout = Gtk.MenuItem(label="About")
menu.append(menuitemAbout)
menuitemQuit =…
I am building a GUI (Python binding of GTK3) where one Gtk Scrolled Window (from Glade) can contain different treeviews. The program launches with an empty window and the first time around everything works with:
…
I want to implement a feature which will allow user to navigate in Gtk.TreeView widget by arrow keys, unfortunately select_iter() method is not doing what I was expecting from it, i. e. it fails to select parent node of selected node :P
And now I…
I'm trying to create a small custom mixer that suits my needs, using python 2.7 and pyalsaaudio 0.7, but I'm stuck with events got from alsamixer when another program changes the volume values. I tried to understand how other mixers work (for…
I've been fighting for three hours now to get this process multithreaded, so that I can display a progress box. I finally got it working, insomuch as the process completes as expected, and all the functions call, including the ones to update the…
I've got an application which makes something in background. To inform the user it update some widgets with its progress. That works.
But somethings there is an error or something else in this background operation so it has to display a dialog. This…
First answer on this question says that Quickly supports GObject introspection and GTK+ 3. Is this means that it USES GObject or it USES GTK+ 3? I ask this because I want to start learning GUI programming with Quickly and Python, so I'm not sure I…
I recently learning to use PyGObject. I can listening a "motion-notify-event" to get mouse move events with a Gtk.Widget. However, it can't work fine outside the window, I need the mouse event outside the window,.Maybe I should ask how a root…
In Python with gobject, I am having immense issues getting input from the user.
Here is my code:
def get_network_pw(self, e):
def okClicked(self):
print(pwd.get_text())
return pwd.get_text()
…
I have a treeiter created with the treeiter = self.devices_treestore.append(parent_treeiter, column_values_list) call.
How can I move it to another parent (with the whole subtree it holds)?