[PyQt] Problems with QSqlQueryModel sort_order

Tony Arnold tony.arnold at manchester.ac.uk
Sat Jan 7 11:46:42 GMT 2017


Gerry,

On Sat, 2017-01-07 at 19:06 +0800, Gerry Brown wrote:
> Greetings,
> 
> I have just started using PyQT and I am having problems with 
> QSqlQueryModel.  It doesn't seem to have an attribute of
> sort_order.  
> How can I have the Postgresql database do the sorting?
> 

I tend to do such sorting in the view, not the model. I use QTableView
in my application and that provides a sort function.

Regards,
Tony.

-- 
Tony Arnold MBCS, CITP | Senior IT Security Analyst | Directorate of IT Services | G64, Kilburn Building | The University of Manchester | Manchester M13 9PL | T: +44 161 275 6093 | M: +44 773 330 0039


More information about the PyQt mailing list