I have added a QLineEdit above my QTableView where when a user enters text, a filter happens on the tables contents using QSortfilterProxyModel
I am trying to highlight only the text inside cells of the QTableView which matched the text/reg exp in QLineEdit,
similar to the Qt Creator - Ctrl+F on the CPP Editor and it highlights only the matched strings.
I'm currently trying to do this using my own QStyledItemDelegate and doing inside the paint method, but I am finding it hard to do manage many things here in paint like Multiline, Background color on selection etc, is there a better way to do this?
Can I use QSyntaxHighlighter to highlight text in QTableView? or is there any other easier way?