Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Failed to insert huge data(>=2M rows) from txt file to qtable(10 columns) using QTableWidget
Forum Updated to NodeBB v4.3 + New Features

Failed to insert huge data(>=2M rows) from txt file to qtable(10 columns) using QTableWidget

Scheduled Pinned Locked Moved Unsolved Qt for Python
4 Posts 3 Posters 539 Views 1 Watching
  • 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.
  • P Offline
    P Offline
    pavanK993
    wrote on last edited by
    #1

    I have been using QTableWidget and add item to insert data to table but it's taking a lot of time to load ! is there any way to make it very efficient? saw few articles about pagination(present only few rows at a time ) will it work for column and row level filtering, sorting and search functionalities? or shall i go for view/model programming
    Thanks in Advance !!!

    jsulmJ JonBJ 2 Replies Last reply
    0
    • P pavanK993

      I have been using QTableWidget and add item to insert data to table but it's taking a lot of time to load ! is there any way to make it very efficient? saw few articles about pagination(present only few rows at a time ) will it work for column and row level filtering, sorting and search functionalities? or shall i go for view/model programming
      Thanks in Advance !!!

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @pavanK993 said in Failed to insert huge data(>=2M rows) from txt file to qtable(10 columns) using QTableWidget:

      is there any way to make it very efficient?

      Use https://doc.qt.io/qt-5/qtableview.html instead. It will also allow you filtering.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • P pavanK993

        I have been using QTableWidget and add item to insert data to table but it's taking a lot of time to load ! is there any way to make it very efficient? saw few articles about pagination(present only few rows at a time ) will it work for column and row level filtering, sorting and search functionalities? or shall i go for view/model programming
        Thanks in Advance !!!

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #3

        @pavanK993
        In addition to @jsulm. 2 million rows is still a lot to read from a text file and to put into an in-memory model. You may want to implement QAbstractItemModel::fetchMore() as, say, a SQL model would. Sorting will also be costly. And so on.

        1 Reply Last reply
        2
        • P Offline
          P Offline
          pavanK993
          wrote on last edited by
          #4

          @jsulm @JonB Thanks for quick reply and help!!
          looking to include QTableview and QAbstractItemModel along with Paginated display of table data in PyQt for most responsive UI thanks again !!
          Note :: open for your inputs if it's not doable

          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