Questions tagged [pygobject]

GTK+ and other GObject bindings are provided by PyGObject through introspection.

Python library providing bindings for GObject based libraries through GObject-Introspection.

For more information:

817 questions
2
votes
2 answers

Make only some rows bold in a Gtk.TreeView

I want to display the status read or unread of a row by makeing the text (of a column in the row) bold or not. The status of the row (or the data in the model) can be part of the model or somewhere else. I am flexible at this point. How can I make…
buhtz
  • 10,774
  • 18
  • 76
  • 149
2
votes
1 answer

Limit height of GtkTreeView

I am trying to set a height limit for a GtkTreeView and want to use a scroll bar if the row data exceeds this limit. Currently, the whole window grows without limits and goes offscreen at some point. What is needed to get the desired behaviour? My…
epR8GaYuh
  • 311
  • 9
  • 21
2
votes
0 answers

Miniconda + PyGObject: Gtk.Spinner not visible/ how to use system application appearance

I am writing an GUI application using PyGObject with GTK+ 3.16.6 in a miniconda virtual environment (Python 3.6.3). Within my application I want to use a Gtk.Spinner, but this widget is not shown when I start my program within the miniconda…
Stefan Scheller
  • 953
  • 1
  • 12
  • 22
2
votes
2 answers

Use of the Gtk.GLArea in Pygobject GTK3

The documentation for use of the python wrappers for Gtk3 are somewhat limited. I have found several of the common widget examples. I am trying to use the Gtk.GLArea widget. The API documentation is for C and I have not had much luck guessing the…
2
votes
2 answers

How to set the text size of Gtk.Entry in PyGObject?

I want increase the text size of Gtk.Entry . entry = Gtk.Entry() I am using Python3
Sanjay Prajapat
  • 253
  • 2
  • 13
2
votes
1 answer

Can't install PyGObject on macOS

I'm using macOS Python versions: 2.7 / 3.6 pip3 : $ pip3 install PyGObject Collecting PyGObject Could not find a version that satisfies the requirement PyGObject (from versions:) No matching distribution found for PyGObject Same result for pip and…
benyamin
  • 156
  • 2
  • 12
2
votes
2 answers

Python 3 can't import PyGObject

I'm trying to use PyGObject with Python 3, (either on Debian or Linux Mint) so I can use Gtk3+ and Glade for creating GUIs. The problem is this: In Python 3: import gi says module 'gi' not found. I installed python3-gi from the repository, and…
garlic
  • 197
  • 1
  • 11
2
votes
0 answers

Can I use a custom widget as a popup menu?

Basically, I want something that acts like a GtkMenu when it comes to focus and placement, but with an arbitrary widget (button, slider, tree, calendar... anything, really) inside. Putting the widget inside a GtkMenuItem doesn't work - that causes a…
Kyuuhachi
  • 651
  • 6
  • 15
2
votes
1 answer

Python.exe keeps running after closing Gtk.main() when both Gtk and win32ui modules are imported

I run python 2.7.13 on windows 7. I am creating a window with Gtk (from pygobject 3.18.2).I also use win32ui (from pywin32 221).When I import both modules my program runs just fine untill I close it. The window is closing fine, but the python…
bbuggy
  • 25
  • 7
2
votes
0 answers

Embedding matplotlib messes up GTK3 dpi

I have an application that displays a GUI using GTK3 for python 3. It has a plot rendered by matplotlib. When the plot is included in the code the UI gets zoomed in (see pictures). This happens on a mac with retina display. On Ubuntu it works…
2
votes
1 answer

Gtk.TreeModel subclassing

being french I am bad in english, sorry. I upgrade an application running with python and pygtk with python and pyobject for Gtk3. It is difficult to find complete documentation on pyGobject, and I want to map a treemodel with sqlalchemy. I'm stuck…
Rolland T.
  • 23
  • 3
2
votes
1 answer

Gtk3: set a fixed window size (smaller than the requested size from the child widgets)

I want to test the appearance of a window on a smaller monitor than the one I'm using on the development machine. I tried with set_geometry_hints() (setting minimum and maximum width and height), set_resizable(False), set_default_size(), and…
pozzugno
  • 750
  • 6
  • 19
2
votes
1 answer

Failed to install package PyGObject

I am not sure if the error in red colour is visible, it says "raise SystemExit Error: Nothing to do, gio could not be found and is essential." I tried installing the latest version of GTK3 as mentioned in the link below but still it shows the same…
Neha
  • 50
  • 10
2
votes
1 answer

Callback not called in pygobject notification action

I'd like to add an action to my Notification with a callback. I'm using pygobject with the following code: import logging from time import sleep import gi gi.require_version('Notify', '0.7') from gi.repository import Notify def callback(*args,…
awelkie
  • 2,422
  • 1
  • 22
  • 32
2
votes
0 answers

Gtk-WARNING **: Content added to the action area of a dialog using header bars

This warning appears when I add a custom Gtk.Box in a Gtk.Stack. class MainWindow(Gtk.ApplicationWindow): """ Class that inherits of Gtk.ApplicationWindow and that represents the main window application """ def __init__(self,…
Matheus Saraiva
  • 1,144
  • 1
  • 11
  • 33