It looks like you're new here. If you want to get involved, click one of these buttons!
I tried to connect to MySQL database by QSqlDatabase but it failed. Script still running but result not as expected.
I don't know what wrong I did.
q0sql = QSqlDatabase.addDatabase("QMYSQL ")
#q0sql.driverName = "QMYSQ"
print(q0sql.isValid())# result False
ok = q0sql.open()
thank for your helping.