I'm sorry but I don't understand what you want.
I'm sorry but I don't understand what you want.
wysota, excuses for my english.
What it is occurring is that the "QDataTable" order the hour and date for top, then all time that I bring up to date a register, it is effecting the ordinance.
I does not want that it makes this.
http://200.193.29.195/qt3/qdatatable.png
edm.
The rows will be always ordered in some way. If you want a different order, just sort then using other columns.
Hi Jacek,
But I don't understand what you it wanted to say. I simply want that the "QDataTable" does not effect sorting.
edm
By default the datatable doesn't do any sorting. Maybe it's SQL that sorts your data?
I am not making ORDER BY in Query SQL.
Code:
/***************************************/
....
/* Execute Query from dataTable */
QString sqlAcompanhamento = QString("SELECT ....");
cur = new QSqlSelectCursor( sqlAcompanhamento );
/* Show Fields */
dataTable->addColumn("id_ocorrencia", tr("Nº Ocor"), 70);
dataTable->addColumn("nm_bairro_prv", tr("Logradouro"), 190);
dataTable->addColumn("id_viatura", tr("VTR"), 85);
dataTable->addColumn("tm_ocorrencia", tr("HIO"), 90);
dataTable->addColumn("dt_tm_empenho", tr("HEM"), 180);
dataTable->addColumn("dt_tm_chg_ocor", tr("HCO"), 180);
dataTable->addColumn("dt_tm_sai_ocor", tr("HSO"), 180);
dataTable->addColumn("dt_tm_chg_inter", tr("HCLI"), 180);
dataTable->addColumn("dt_tm_sai_inter", tr("HSLI"), 180);
/* Ajust Columns */
dataTable->adjustColumn(0);
dataTable->adjustColumn(1);
dataTable->adjustColumn(2);
dataTable->adjustColumn(3);
dataTable->adjustColumn(4);
dataTable->adjustColumn(5);
dataTable->adjustColumn(6);
dataTable->adjustColumn(7);
dataTable->adjustColumn(8);
dataTable->adjustColumn(9);
/* Mode DataTable */
dataTable->setSqlCursor( cur, false, true );
dataTable->setNullText( "" );
dataTable->QTable::setColumnWidth( 3, 50 );
dataTable->QTable::setSorting(false);
dataTable->refresh(QDataTable::RefreshData);
dataTable->show();
/***************************************/
edm.
It does not have to be this. I tried to pass "Query SQL" passing "ORDER BY" more the problem continues, the date and hour continues jumping for top when they are brought update.
http://200.193.29.195/qt3/AcompanhamentoForm.html
edm.
Bookmarks