{
this->setMaximumHeight(400);
QSqlQuery query
("SELECT Imie, Nazwisko, Data_operacji, Nazwa_operacji FROM m_transporty_operacje AS Top LEFT JOIN m_uzytkownicy AS U ON (U.ID_u=Top.ID_uzytkownik) WHERE ID_transport="+ID_transport
+" ORDER BY Data_operacji DESC");
int i = 0;
while (query.next()) {
GbTMP->setMinimumHeight(70);
GbTMP->setMaximumHeight(70);
QDateTime DTData
= query.
value(2).
toDateTime();
QLabel *Uzytkownik
= new QLabel(query.
value(0).
toString()+" "+query.
value(1).
toString());
QLabel *Data_operacji
= new QLabel(DTData.
toString("yyyy-MM-dd HH:mm:ss"));
GbTMP->setLayout(layoutTMP);
layout->addWidget(GbTMP,i++,0,1,1);
}
base->show();
this->setCentralWidget(base);
this
->move
(((QApplication::desktop()->width
()-this
->width
())/2),
((QApplication::desktop()->height
()-this
->height
())/2));
}