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. How to show many records in QTableView
Forum Updated to NodeBB v4.3 + New Features

How to show many records in QTableView

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 758 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.
  • M Offline
    M Offline
    mbnoimi
    wrote on last edited by
    #1

    Hi,

    I'm using QTableView to view a query result includes 500,000 records but unfortunately QTableView became too slow (it spend about 5min to show them)!

    How can I load 500,000 records on QTableView as fast as I can get?

    Here's a snippet of my code:
    [code]_filterProxy = new QSortFilterProxyModel(this);
    _filterProxy->setSourceModel(_db->model_analysisInResults());
    _filterProxy->setFilterKeyColumn(1);

    //FIXME: enhance table view for 1/2 million records
    ui->tableView_analyse->setModel(_filterProxy);[/code]
    

    P.S I imagine two solutions but I don't know how to perform them (or one of them)!

    Split the records to pages (similar to google).

    Load the viewed records only thus the used memory of the application will be small.

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

      After googling for hours I "found a single result":https://stackoverflow.com/a/21162847 which is somehow answering my question but unfortunately it's very theoretically.

      May someone help me to find a practical solution (snippet, library... etc)

      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