
Originally Posted by
const
Hello, Zweieck! What about your plans? I think that such tools will be very useful for all database/qt developers.
I write one to extract from mysql + edit
to get on http://ppk.ciz.ch/qt_c++/mysql_model_browser/ 24 kb

if you write a url connection to db you can swap to other driver ...
and rewrite all global query
QString Scheme
= QString( "mysql://username:pass@host:port/database" ) const QString dbase
= dns.
path().
replace("/",
"");
QString const type
= "Q"+dns.
scheme().
toUpper();
if (!drivers.contains(type)) {
std::cout << "######### " << qPrintable(tr("Unable to Load Driver %1").arg(type)) << "\n" << std::endl;
return false;
}
QString Scheme = QString( "mysql://username:pass@host:port/database" )
QUrl dns(Scheme,QUrl::TolerantMode);
const QString dbase = dns.path().replace("/","");
QStringList drivers = QSqlDatabase::drivers();
QString const type = "Q"+dns.scheme().toUpper();
if (!drivers.contains(type)) {
std::cout << "######### " << qPrintable(tr("Unable to Load Driver %1").arg(type)) << "\n" << std::endl;
return false;
}
To copy to clipboard, switch view to plain text mode
Bookmarks