Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to use proxymodel in desktop app
Qt 6.12 LTS is out! See what's new in the release blog

How to use proxymodel in desktop app

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

    In application, I use the deprived class of QAbstractTableModel in main thread, handle datas in sub thread and send emit data to main thread. The application runs smoothly to show110W data.
    I use QSortFilterProxyModel as prox for deprived class of QAbstractTableModel in main thread, handle datas in sub thread as before, however, the application is suspended and thread is died.
    The application run ok while handling a little data.

    Is there any possible to do that?
    Best Regards

    JonBJ 1 Reply Last reply
    0
    • joweiJ jowei

      In application, I use the deprived class of QAbstractTableModel in main thread, handle datas in sub thread and send emit data to main thread. The application runs smoothly to show110W data.
      I use QSortFilterProxyModel as prox for deprived class of QAbstractTableModel in main thread, handle datas in sub thread as before, however, the application is suspended and thread is died.
      The application run ok while handling a little data.

      Is there any possible to do that?
      Best Regards

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

      @jowei said in How to use proxymodel in desktop app:

      handle datas in sub thread

      I probably comes down to what exactly you mean by this. You must not make calls to the model data from a secondary thread while it is in use in the main/UI thread. Do you? The fact that it works when you don't use QSortFilterProxyModel is probably "fortunate", and the fact that "run ok while handling a little data" but "application is suspended and thread is died." when more data implies problems show up when a decent amount of data is involved.

      1 Reply Last reply
      1

      • Login

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