[Interest] QSqlDatabase

Graham Labdon Graham.Labdon at avalonsciences.com
Wed Feb 4 14:51:34 CET 2015


Hi
I am just starting to explore Qt support for databases and have this as a first attempt to open a data base
	QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
	db.setHostName("bigblue");
	db.setDatabaseName("flightdb");
	db.setUserName("acarlson");
	db.setPassword("1uTbSbAs");
	bool ok = db.open();

When I run this ok is always true, no matter what arguments are passed.

I would be grateful if someone could explain this

Thanks



More information about the Interest mailing list