Quote:
Originally Posted by chaley
What should work today is library_view.select_rows(). This is not a search, but instead will highlight the rows in the view in the same fashion as search w/highlight search results. The user can use next and previous to move around in the highlighted set. This technique will not interfere with searching and restrictions.
|
So I decided to give this approach a go. I have built up a list of ids I want to highlight, and have code something like this:
Code:
self.gui.search.clear() # As my code works across the whole library
invalid_ids = [... build up my model ids...]
self.gui.library_view.model().set_highlight_only(True)
self.gui.library_view.select_rows(invalid_ids)
However all that does is select the rows, it won't actually color them. The highlighting code seems to take place in the search code in BooksModel, where it sets those "ids_to_highlight" etc.
Any suggestions as to what else I need to do?