Skip to content
Advertisement

Tag: gtk

code completion support with gi.repository in VS Code

I’m trying do code a simple app with GTK4 in Python using VS Code. What I do: I don’t have any auto completion or type hints in my IDE because gi.repository uses dynamic imports, is there any way to change this behavior? Answer In Python typing annotations can be written separately from the main module code (in .pyi files or

PyGObject: How to create hamburger menu programmatically

I would like to create a “primary menu” programmatically, which I believe is also called a “hamburger menu”. I have done several of these while working on web development side, but I have never done these using Python and GTK. This topic seems to be controversial and there are a lot of different solutions out there. I would like to

Gtk textview can’t set text [Python]

This is a desktop environment project,I’m try use textview make a terminal,but I got some problem,I can’t use set_buffer() function set text, My code: I trying use set_buffer() to set textview’s text(in line 56),but I got an error: When I change line 56 to bash1.set_buffer(Gtk.TextBuffer) later,I still got an error: How to solve this problem? Answer Gtk.TextView.set_buffer() takes a Gtk.TextBuffer

GtkWarning: could not open display

I am trying to run a spider on a vps (using scrapyjs which uses python-gtk2). On running the spider I am getting the error How do I run this in a headless setup? Answer First of all, you didn’t specify if you have a desktop environment (or X) installed on your server? Regardless of that, you can achieve headless setup

Advertisement