Results 1 to 2 of 2

Thread: QSortFilterProxyModel - filterKeyColumn

  1. #1
    Join Date
    Jul 2007
    Location
    Coimbra, Portugal
    Posts
    11
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QSortFilterProxyModel - filterKeyColumn

    Hello,

    I'm having a problem when using a filterKeyColumn.
    When I do this:
    Qt Code:
    1. proxyModel->setFilterKeyColumn(-1);
    To copy to clipboard, switch view to plain text mode 
    It doesn't work.
    I'm using the FixedString option.

    Using a specific column it work ok, but with -1, that should be for all columns it doesn't work.
    I've tried to change the example that comes with Qt, basicsortfiltermodel

    I've just changed this method to this:
    Qt Code:
    1. void Window::filterColumnChanged()
    2. {
    3. if (filterColumnComboBox->currentIndex() == 3)
    4. proxyModel->setFilterKeyColumn(-1);
    5. else
    6. proxyModel->setFilterKeyColumn(filterColumnComboBox->currentIndex());
    7. }
    To copy to clipboard, switch view to plain text mode 
    and add this line 62
    Qt Code:
    1. filterColumnComboBox->addItem(tr("All"));
    To copy to clipboard, switch view to plain text mode 

    So if some ones know how to solve this problem, it would be very nice.
    I'm using Windows Qt 4.3.1
    --
    Tiago Correia

  2. #2
    Join Date
    Jul 2007
    Location
    Coimbra, Portugal
    Posts
    11
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QSortFilterProxyModel - filterKeyColumn

    Problem fixed.

    I've received a email from qt-bugs, at it seems to be a bug on version 4.3.1. It going to be fixed on the next version 4.3.2
    --
    Tiago Correia

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.