I m working on a small project in QT (well, pyQT4 actually, but it shouldn t matter too much) and I ve run into the following problem. I have a QTableView
with several rows and columns. I have set the selection mode to be rows only. When I call getSelectedIndexes()
on my QTableView
, I get an index for every row and column, which in the current setup means that I get an extra 5 Indexes for each selected row, which is less than ideal, since I only need to know the row, not the column. Is there any way to get just one Index per row other than filtering the list that I get from getSelectedIndexes()
?
Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...