[Interest] Default delegate with QTableView and QSqlTableModel

Tr3wory tr3w at freemail.hu
Thu Mar 28 15:50:11 CET 2013


On Thu, Mar 28, 2013 at 11:18 AM, André Somers <andre at familiesomers.nl> wrote:
> For your case, I think I would make a simple proxy model based on
> QIdentityProxyModel that adapts the data type from longlong to int when
> possible and where desirable. That should only take a couple of loc. I don't
> think it will be easy to coax the driver into using int instead of longlong.
>
> André
>

The QIdentityProxyModel works like a charm, except:
- for empty table (rows()==0) the header is wrong
(https://bugreports.qt-project.org/browse/QTBUG-23572)
- when the program starts the header is also wrong until I click on it.

For the first, the workaround works from the bug report.
Do anybody have any idea for the second?

tr3w



More information about the Interest mailing list