Questions tagged [pygtk]

PyGTK is the Python binding for the GTK+ widget library.

PyGTK lets you easily create programs with a graphical user interface using the Python programming language and the GTK+ library. GTK+ provides all kinds of visual elements and utilities, and is the official toolkit of the GNOME Desktop.

PyGTK applications are multiplatform and able to run, unmodified, on Linux, Windows, MacOS X and other platforms.

For more information, see the Wikipedia page of PyGTK.

2238 questions
0
votes
1 answer

Can I make a custom pygtk tooltip stay on when the cursor is over it?

Please look at the following snippet : import gtk def callback(widget, x, y, keyboard_mode, tooltip): hbox = gtk.HBox(False, 8) button = gtk.Button('Exit Tooltip') label = gtk.Label('Tooltip text') …
user975506
0
votes
2 answers

pygtk popup executes out of order

I have pygtk menu, in which a function is called on menuitem click, in this function i am showing a popup to user saying wait while checking internet connectivity and then calling a function which checks internet connectivity, My problem is the my…
Shital
  • 175
  • 3
  • 7
0
votes
0 answers

PyGtk TreeView - Sort underlying model when column is sorted

I have a Gtk TreeView written in PyGtk. I have implemented a sort when the user clicks on the treeview column header. something like self.liststore_model = Gtk.ListStore(YosemiteObject.__gtype__, str, str, bool) self.liststore_model.set_sort_func(1,…
Glenn Pierce
  • 720
  • 1
  • 6
  • 18
0
votes
0 answers

Gtk.TreeView: Possible to show tooltip when text of the cell is clipped?

I want to show the full text of a cell as a tooltip, when the text is too long and clipped. Is that possible with GTK3 TreeView? If you don't understand what I mean, suppose a TreeView like below. Column1 is too narrow to hold the full "Oh say can…
Damn Vegetables
  • 11,484
  • 13
  • 80
  • 135
0
votes
1 answer

PyGTK - webkit.WebView not working with Ubuntu 11.04

here is code snippets: import gtk, webkit, os w = gtk.Window() w.set_title("Example Editor") w.connect("destroy", gtk.main_quit) w.resize(500, 500) editor = webkit.WebView() editor.load_html_string("

This is a test",…

Yajushi
  • 1,175
  • 2
  • 9
  • 24
0
votes
0 answers

Theme parser error: Expected a valid color

I want to change the color of the "checkmark" icon to blue, but the color does not change. Instead, I get following error: (main.py:23000): Gtk-WARNING **: 15:13:17.402: Theme parser error: style.css:25:58-59: Expected a valid color. My CSS code…
Phoeniqz
  • 23
  • 4
0
votes
0 answers

Python GTK, how to make MessageDialog grow depending on the child widget's height?

I was using C# GTK (Gtk#), but when I asked ChatGPT how to add a scrollbar to MessageDialog, it answered in Python, and it seems Python GTK is more popular than C# GTK, so I tried to test in in Python. ChatGPT's code added a scrollbar, but the line…
Damn Vegetables
  • 11,484
  • 13
  • 80
  • 135
0
votes
1 answer

How to render OpenCV frames in OpenGL 3.2 GtkGLArea in Python?

How do I render images captured by OpenCV in OpenGL 3.2 GtkGLArea in Python? Many of the examples online are 10 years old, outdated and are using OpenGL 2.1 or 1.1 examples. The only way I can do this is through shaders. The only working example to…
0
votes
1 answer

CSS styling for Gtk Widgets not working (Python, Gtk4)?

In my app I want some kind of profile picture a user can have. At first wanted to use libadwaita's Avatar widget, but it cannot load images from a file, which is a feature that I need. So I thought I would just implement a normal Gtk.Image and set…
Phoeniqz
  • 23
  • 4
0
votes
1 answer

How to enable GPU rendering in Python Gtk3 in Windows?

I noticed that Gtk in Windows seems to be rendering images using the CPU rather than the GPU (whereas in Linux this does not seem to be the case). I am creating a program using Python, Gtk3, and OpenCV which streams video from a camera and displays…
0
votes
0 answers

PyGTK Not possible to change label's markup with variable from a different process

I've created an application in Python GTK and I am also using zeromq to connect with a different program. I am receiving a variable from client program and I store it inside shared_memory. The problem is that even though I successfully print correct…
0
votes
1 answer

Prevent ListBoxItems from being resized (specifically shrunk)

I have a Gtk Listbox to which I'm adding a large number of items (basically text labels). I've put the ListBox inside a ScrolledWindow but if I add too many items then the height of each item is reduced until the text on the label is no longer…
Carcophan
  • 1,508
  • 2
  • 18
  • 38
0
votes
1 answer

PyGTK custom timing

I need to have a custom timing for a component of my program (essentially i'm counting turns, at the rate of around 20 turns per second). Each turn i need to process some information. However, I have to do this so that it could work with PyGTK. Any…
Pwnna
  • 9,178
  • 21
  • 65
  • 91
0
votes
2 answers

pygtk OSError: [Errno 2] No such file or directory. subprocess.Popen PIPE command

I'm new to python and I'm trying to make a search bar that searches only 2 directories using two find commands and output the results into an ordered list []. def search_entry(self, widget,): s1 = subprocess.Popen(['find…
user961559
  • 109
  • 1
  • 3
  • 9
0
votes
1 answer

gtk.PrintOperation reset status?

Is it possible to reset status of printing somehow, or is it always necessary to create new PrintOperation? For example, if you show printPreview, it is necessary to recreate PrintOperation before calling it again.
Marin
  • 1,311
  • 16
  • 35