What widget to use to build a BIG Excel like grid?
I'm going to experiment with writing a simple spreadsheet application. I have tried the existing ones and NONE could handle reasonably fast an excel file with 130,000 lines and lots of columns, so I thought this would be a good exercise.
I have not done Qt in a while and with version 5 out I thought things may have changed.
What would you use to make a HUGE grid?
I was thinking of using a QGraphicsView and develop custom widgets for the cells but maybe there is something easier?
Thanks in advance and long live the best GUI toolkit!
You Could use a QTableView (as MulderR suggests) with a custom model and try lazy loading it or check if already supports lazy loading (I presume it does).
Thank you, that's what I'm trying. Problem is I have to customize its behaviour heavily and there are some things I might not be able to handle, such as merging cells for instance.
Merging is easy: "setSpan":http://qt-project.org/doc/qt-5.0/qtwidgets/qtableview.html#setSpan
Some customization is possible through delegates. What exactly do you need?
Oh thanks, it should do it then :) I just need to figure out the various events I need to intercept now to emulate excel behaviour, such as when editing a formula and clicking elsewhere the current editor widget needs to keep its textcursor position, its a load of fun!
[quote author="djfm" date="1365618877"]I have tried the existing ones and NONE could handle reasonably fast an excel file with 130,000 lines and lots of columns[/quote]
I'm not sure here if you mean you have tried existing examples, but anyway, here is an example spreadsheet app you may find useful as a reference: