hello!

We define the python type REGEXP function in sqlite and python following this example on stackoverflow: Problem with regexp python and sqlite

How can we do the same thing in PyQT, ie. with a QSqlDatabase?

More precisely, we use the REGEXP function to create a view:

Qt Code:
  1. Create view temp as select * from somewhere where columnname REGEXP 'myregex';
To copy to clipboard, switch view to plain text mode 

This works well, as long as we do the select from python. We would like to show the result in a QTableView (via a QSqlTableModel filled with the view). As the view uses the REGEXP, we would have to link the python regex function to the QSqlDatabase.

Is there a way of doing that?

Thanks in advance!