Jan-10-2023, 08:41 PM
change getData to
def getData(self): connection = QSqlDatabase.addDatabase('QSQLITE') connection.setDatabaseName('testDB.sqlite') connection.open() if not connection.isOpen(): print('Connection error occurred.') else: print(connection.tables())