Results 1 to 2 of 2

Thread: Custom Model and Proxy Model

  1. #1
    Join Date
    Nov 2010
    Posts
    22
    Thanks
    8
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Custom Model and Proxy Model

    Hello, I have a custom model and a custom proxy model for it.

    I have noticed that I the removeColumns virtual function does not propagate to my model

    Qt Code:
    1. bool CustomProxy::removeColumns (int column, int count, const QModelIndex & parent)
    2. {
    3. // source model is a custom model derived from QAbstractTable
    4. return sourceModel()->removeColumns(column, count, parent);
    5. }
    To copy to clipboard, switch view to plain text mode 

    is this normal?
    I would expect the proxy to propagate the removeColumns(...) to its source model by default

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Custom Model and Proxy Model

    What is the base class of your proxy model? As far as I remember QSortFilterProxyModel does propagate.

Similar Threads

  1. Replies: 9
    Last Post: 14th February 2013, 20:39
  2. A Totalling Proxy Model?
    By ChrisW67 in forum Qt Programming
    Replies: 2
    Last Post: 7th April 2010, 04:06
  3. Custom proxy model issue
    By Khal Drogo in forum Qt Programming
    Replies: 13
    Last Post: 30th November 2007, 13:41
  4. Model, View and Proxy
    By No-Nonsense in forum Qt Programming
    Replies: 2
    Last Post: 21st November 2006, 09:50
  5. Model and Proxy
    By larry104 in forum Qt Programming
    Replies: 1
    Last Post: 4th August 2006, 22:05

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.