PDA

View Full Version : QSqlDatabase Time out no network to long....



patrik08
10th March 2007, 00:04
I observe QSqlDatabase have a long time to detect if network is down......

20 second or moore....

is the not a way to reduce this time and emit error before ....
or how write a QTcpSocket to ping mysql port 3306 .... normal the port respond on max 3-4 second white version & other string....

jacek
10th March 2007, 00:41
It looks like MySQL driver doesn't allow you to set the timeout.

See: QSqlDatabase::setConnectOptions()