Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. What widget to use to build a BIG Excel like grid?
QtWS25 Last Chance

What widget to use to build a BIG Excel like grid?

Scheduled Pinned Locked Moved General and Desktop
7 Posts 5 Posters 8.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    djfm
    wrote on last edited by
    #1

    Hello,

    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?
    Any advice?

    Thanks in advance and long live the best GUI toolkit!

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MuldeR
      wrote on last edited by
      #2

      QTableView?

      http://qt-project.org/doc/qt-4.8/qtableview.html#details

      My OpenSource software at: http://muldersoft.com/

      Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

      Go visit the coop: http://youtu.be/Jay...

      1 Reply Last reply
      0
      • P Offline
        P Offline
        prady_80
        wrote on last edited by
        #3

        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).

        1 Reply Last reply
        0
        • D Offline
          D Offline
          djfm
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • Chris KawaC Offline
            Chris KawaC Offline
            Chris Kawa
            Lifetime Qt Champion
            wrote on last edited by
            #5

            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?

            1 Reply Last reply
            0
            • D Offline
              D Offline
              djfm
              wrote on last edited by
              #6

              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!

              1 Reply Last reply
              0
              • P Offline
                P Offline
                panosk
                wrote on last edited by
                #7

                [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:
                http://qt-project.org/doc/qt-5.0/qtwidgets/itemviews-spreadsheet.html

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved