I am new to python and I am currently trying to get a value from a spin button that has been created in Glade. I have the following code to try to get the value from the button then use it to filter data:
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
class Handler:
def on_spinbutton1_value_changed(self, SpinButton):
Area = self.builder.get_object("spinbutton1")
Area = self.Area.get_value_as_int()
print Area
builder = Gtk.Builder()
builder.add_from_file("DataApp.glade")
builder.connect_signals(Handler())
window = builder.get_object("MainWindow")
window.show_all()
Gtk.main()
I get no errors however the number entered also does not print. Any suggestions on how to get this running? Any help is greatly appreciated!