Subversion Repositories OpenInventory

Compare Revisions

Ignore whitespace Rev 191 → Rev 192

/trunk/DBViewer/database.cpp
204,6 → 204,7
QString inctance; // èìÿ òàáëèöû, õðàíèëèùà
QString className; // èìÿ êëàññà
int field_ID;
int icon_field_index;
bool filtr_empty;
bool ok;
QSqlQuery q;
271,6 → 272,7
 
field_ID = q.record().indexOf(tr("ID"));
 
icon_field_index = q.record().indexOf(tr("Icon"));
/*
if (q.size() <= 0) return;
title_item = new QTreeWidgetItem(parent_object_item);
292,6 → 294,25
itm->setText(1, tr("object"));
itm->setText(2, ID_tmp);
 
 
if (icon_field_index != -1){ // åñëè èìååòñÿ ïîëå ñ èêîíêàìè
QVariant data;
QPixmap pix;
QIcon icn;
data = q.record().value(icon_field_index);
if (data.isValid() && (!data.isNull())) {
 
pix.loadFromData(data.toByteArray());
icn.addPixmap(pix);
itm->setIcon(0, icn);
}
 
 
 
}
 
 
 
// itm->setIcon(0, icon);