Can someone help me with my application
kevekop opened this issue · comments
i'm making an application and i would like to put the date and time on my lable...
i made my application with glade and than trying to programe it with GTK
this is where i got sofar
"
_import datetime
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk as gtk_
class Main:
def init(self):
gladeFile = "main.glade"
self.builder = gtk.Builder()
self.builder.add_from_file(gladeFile)
self.builder.connect_signals(self)
window = self.builder.get_object("Main")
window.connect("delete-event", gtk.main_quit)
window.show_all()
window.set_decorated(False)
dat = datetime.datetime.now()
Label = self.builder.get_object("Date_And_Time")
Label.set_text(dat)
def Switch_LED(self, switch, gparam):
if switch.get_active():
state = "Led_On"
else:
state = "Led_Off"
print("Led_Switch was", state)
def Switch_Licht(self, switch, gparam):
if switch.get_active():
state = "Licht_on"
else:
state = "Licht_off"
print("Licht_Switch was", state)
def Luik_Open(self, button):
state = "Rolluik_open"
print(state)
def Luik_Dicht(self, button):
state = "Rolluik_dicht"
print(state)
if name == 'main':
main = Main()
gtk.main()
"
ps. sorry if i am at the wrong place for asking
Just like yesterday, this repository is for the Rust bindings of GTK and has nothing to do with Python.