Results 1 to 11 of 11

Thread: Problems with QSortFilterProxyModel

Threaded View

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

    Default Re: Problems with QSortFilterProxyModel

    Quote Originally Posted by Nefastious View Post
    How exactly should I do that?

    like this?

    Qt Code:
    1. ...
    2. proxyModel->mapToSource();
    3. model->removeRows( current, 1 );
    4. ...
    To copy to clipboard, switch view to plain text mode 
    Before you just guess how to do, just follow the link and read:
    QModelIndex QSortFilterProxyModel::mapToSource ( const QModelIndex & proxyIndex ) const
    so in your case:
    Qt Code:
    1. foreach ( const QModelIndex & index, selection.indexes() ) {
    2. rows.append( ui->View->model()->mapToSource(index).row() );
    3. }
    To copy to clipboard, switch view to plain text mode 

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

    Nefastious (31st October 2009)

Similar Threads

  1. Mac OSX OpenGL problems
    By tksharpless in forum Qt Programming
    Replies: 0
    Last Post: 23rd March 2009, 18:27
  2. problems creating toolbar...(do see the attachment)!
    By sumit in forum Qt Programming
    Replies: 15
    Last Post: 10th September 2008, 12:23
  3. flicker and wierd resize problems ...
    By momesana in forum Qt Programming
    Replies: 1
    Last Post: 12th May 2008, 19:00
  4. QT4 Plugins - problems, problems
    By NormanDunbar in forum Qt Programming
    Replies: 6
    Last Post: 9th May 2006, 16:39

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.