Results 1 to 4 of 4

Thread: Developing model/view for different type of objects (Long text - conpcetual question)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Developing model/view for different type of objects (Long text - conpcetual quest

    Quote Originally Posted by FYgonzalo View Post
    Now I don't understand why you would recommend to use multiple models instead of a single one with different proxy models, apart of maybe being a little more complex.
    It is mostly about complexity, both in terms of code complexity and runtime/processing complexity.

    Code complexity: an approach with a single model and proxies is often much more complicated to develop and maintain
    Runtime complexity: a proxy model has no "knowledge", e.g. for filtering it always has to traverse the full source model. A specialized model can use "knowledge" about the data.

    Quote Originally Posted by FYgonzalo View Post
    I want it to remember expanded/collapsed nodes in the current session.
    Then you need to react to the respective signals of QTreeView and store the expand/collapse state in your internal data structure.

    Cheers,
    _

  2. The following user says thank you to anda_skoa for this useful post:

    FYgonzalo (20th February 2019)

Similar Threads

  1. Replies: 3
    Last Post: 22nd March 2017, 03:51
  2. Model/View Question
    By meazza in forum Newbie
    Replies: 7
    Last Post: 25th January 2015, 17:14
  3. Model / View - Design Question
    By antarctic in forum Qt Programming
    Replies: 8
    Last Post: 8th June 2009, 07:39
  4. model/view editing question
    By KShots in forum Qt Programming
    Replies: 2
    Last Post: 11th September 2008, 17:52
  5. General Question about Qt4 Model/View
    By reed in forum Qt Programming
    Replies: 2
    Last Post: 13th May 2008, 15:06

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.