Subversion Repositories OpenInventory

Compare Revisions

Ignore whitespace Rev 130 → Rev 131

/trunk/DBViewer/mainwindow.cpp
24,7 → 24,7
ui->treeWidget->setAlternatingRowColors(true);
ui->treeWidget_2->setAlternatingRowColors(true);
MainWindow::openDataBase();
MainWindow::buildPreviewModel(tr("Ìîÿ ìîäåëü"), tr("7"));
MainWindow::buildPreviewModel(tr("Ìîÿ ìîäåëü"), tr("1"));
MainWindow::initComboBox();
getDatabaseData();
//// sql_mogel = new QSqlTableModel();
252,8 → 252,14
bool MainWindow::openDataBase(){
QString errorString;
sql = QSqlDatabase::addDatabase("QMYSQL");
sql.setDatabaseName(tr("an_db"));
// sql.setDatabaseName(tr("an_db"));
 
sql.setDatabaseName(tr("inventory"));
sql.setHostName(tr("localhost"));
 
 
 
 
sql.setUserName(tr("an"));
sql.setPassword(tr("393939"));