I've been trying to create a program that registers and logs in a user, the register part should store the details into a database but I've experienced a bit of trouble with taking input from the QT text box and inserting it into my database. It doesn't take any input from the text box, so I've tried to use qtsql to help me input data, but I can't manage to get it working.
#Register
def InsertData(self):
db=QSqlDatabase.addDatabase("QSQLITE")
db.setDatabaseName("/home/user/test.db")
if db.open():
query=QSqlQuery
query.exec_("INSERT INTO users(email_address,password) VALUES(?,?)",self.password.text,self.email.text)
db.commit()
db.close()