PDA

View Full Version : [Q] sorting&filtering on sqlite with qte-4.7.2



jameslee
12th June 2013, 06:20
i'v tested sorting&filtering on sqlite with qte-4.7.2.
but Dates are not filtered between minimum(1970.1.1) and maximum(2099.12.31). where is wrong point?
..
createConnection_3();
..
model = new QSqlRelationalTableModel(this);
model->setTable("albums");
model->select();

proxyModel = new MySortFilterProxyModel(this);
proxyModel->setDynamicSortFilter(true);
proxyModel->setSourceModel(model);
ui->tableView->setShowGrid(true);
ui->tableView->verticalHeader()->hide();
ui->tableView->setModel(proxyModel);
...
void userset_Dialog_32::dateFilterChanged()
{
proxyModel->setFilterMinimumDate(ui->fromDateEdit->date());
proxyModel->setFilterMaximumDate(ui->toDateEdit->date());
}

i attached files.
thanks!