Qt-interest Archive, December 2007
tableview model view problem
Message 1 in thread
Hello, i am using two tableviews with qsqlquerymodel, in the first table i show the invoice headers and in the
second the lines of every invoice (when i select the invoice in the first table with the mouse), i have any
comboboxes and lineedit to filters the invoice headers, the problem i have is that when i use any of the
invoice header filter i would like that the invoice lines table was cleared but if i use the .clear() method
in the model i lose the header names setted with .setHeaderData, i have tried too setting and invalid
qsqlquery with .setquery() but when i reload any invoice lines the columns lost his size, altough i am using
tableview.resizeColumnsToContents() after every setquery in this table, i have tried too reset the tableview
and headers but this doesnt works either so the only solution that i think i could use subclass qsqlquerymodel
and reimplement headerdata function but i would like to avoid subclass if possible, anyone has a better
solution? Thanks
--
[ signature omitted ]