gtk add tag
hacknorris
My laptop runs kde neon in beta. 

To make the app:

```
import gi

gi.require_version("Gtk", "3.0")
from gi.repository import Gtk

class GridWindow(Gtk.Window):
    def __init__(self):

        super().__init__(title="Box")

        grid = Gtk.Grid()
        self.add(grid)
        
        buttonaa = Gtk.Button(label="•")
        buttonab = Gtk.Button(label="•")
        buttonac = Gtk.Button(label="•")
        buttonad = Gtk.Button(label="•")
        
        buttonaa.connect("clicked", self.on_buttonaa_clicked)
        buttonab.connect("clicked", self.on_buttonac_clicked)
        buttonac.connect("clicked", self.on_buttonae_clicked)
        buttonad.connect("clicked", self.on_buttonag_clicked)
        
        grid.attach(buttonaa, 0, 0, 1, 1)
        grid.attach(buttonab, 0, 1, 1, 1)
        grid.attach(buttonac, 0, 2, 1, 1)
        grid.attach(buttonad, 0, 3, 1, 1)
        
    def on_buttonaa_clicked(self, widget):
        return

    def on_buttonab_clicked(self, widget):
        execfile('levels/mic/yell.py')

    def on_buttonac_clicked(self, widget):
        execfile('levels/gps/fly100.py')

    def on_buttonad_clicked(self, widget):
        execfile('levels/settings/bluetooth.py')
        
win = Gtk.Window()
win.connect("destroy", Gtk.main_quit)
win.show_all()
Gtk.main()
        
```

![Screenshot_20211209_205053-1.png](/image?hash=bc747892aa652ca9e6c5f0a7e2df169c0421fddc83365d48e8e3c425392d625a)

This results to an untitled window without any grid. How can I make it display with a title and a grid of buttons?
Top Answer
hacknorris
well... already solved - just needed to change variable of main window at bottom of file :'D stupid bug :'D

question closed :'D

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.