Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7787989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:50:57+00:00 2026-06-01T20:50:57+00:00

I was wondering where I should put logic for sorting and filtering a Qt

  • 0

I was wondering where I should put logic for sorting and filtering a Qt tables in a MVC model. I’m working with a QAbstractTableModel.

  • My tables are handling anywhere from 20 items to 100,000.
  • I need to handle multiple views of the same data with different sort and filter criteria.

I’m relatively new to the MVC model so bear with me.
Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T20:50:58+00:00Added an answer on June 1, 2026 at 8:50 pm

    If the sorting/filtering is specific to a view, then the filtering/sorting logic belongs in the View.

    Edit: I suppose I should add that the logic itself doesn’t necessarily belong in the view — depending on the situation, you might (for example) have a back-end that uses something like SQL, in which case the query that specifies the filtering/sorting goes in the view, but the implementation of the sorting/filtering itself would end up in SQL implementation. Even if you use something less elaborate than SQL, you can still have a generic implementation of the logic in the back-end, and only a specification of what to do in the view itself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to MVC (I'm using codeigniter) and was wondering where I should put
I am wondering how should I be grouping my repositories? Like from the examples
I was wondering how should I proceed to debug while working with frameworks. Like
Just wondering should I encode all the data before I put in to the
Im setting up a svn repository and wondering where i should put the dll
Was wondering in which layer project i should put the DbContext implementation if i
I'm wondering whether I should create extension methods that apply on the object level
I'm wondering if I should use OpenId for my website. My first exposure to
I am wondering how I should structure a FAQ to keep the semantic meaning
I'm wondering if I should change the software architecture of one of my projects.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.