Problem solved.
My original code was:
m_Db.addDatabase("QMYSQL");
It have to be:
m_Db = QSqlDatabase::addDatabase("QMYSQL");
In the first case
bool ok = m_Db.open();
even if driver il correctly loaded.
Now I have a different proble, if I run directly the program, it is able to connect to the remote database. If I run it inside debugger, I receive this error:
"Open database failed: Can't create TCP/IP socket (10106) QMYSQL: Unable to connect"
Someone know how to configure debugger so to avoid this error?
Thank you.