connecting to database when a form loads using signals and slots