TableView with header and footer for sums, avg and so on
-
Hi!
I want to create a TableView with Header, Data and Footer (SUM, AVG, etc.). I want to scroll the data-values and/or header and footer.
Pictures say more than just words. Here is a drawing of that.
!http://img854.imageshack.us/img854/3628/tableexample.jpg!
I want to set a model via setModel(mymodel).
In this model i want to calculate a new value for the rows...example(pseudo-code):
@
if(model.currentrow.currency == USD)
{
CalcUSDToEuro(currentrow); // calc euro and show in table
}
else if(model.currentrow.currency == GBP)
{
CalcGBPToEuro(currentrow); // calc euro and show in table
}@Is it somehow possible?
I'm very new to qt...sorry.
Thank you for your help!
-
Not with the standard item views. You need a 3rd party component, or make it yourself. ICS has a table view that can do all you want (and more), and I am pretty sure there are other offerings as well.
-
You can take some ideas from http://doc.trolltech.com/4.7-snapshot/itemviews-frozencolumn.html
-
Thanks....i can't get it working. Maybe my QT-Knowledge is not that good.
Any other ideas or some code?
Thank you very much!!!!
-
Do you have any specific questions? What did you try? What did not work? Did you look at the mentioned alternatives?
-
this goes in directtion of "this":http://developer.qt.nokia.com/forums/viewthread/1978/ topic. From my point of view, you need external tools (like that from ICS), as I think the sollution proposed in the docs (2 views, on rfixed, one scrolling) has some unusual behavior issues (moving focus by keys to the fixed rows etc.).