[PyQt] Reporting Bugs in PyQt/Qt

Ian hobson42 at gmail.com
Mon Nov 29 12:42:53 GMT 2010

Hi Everyone

I have four bugs to report. Where should they be reported?

1) The PyQt documentation contains a lot of things like this:  at 

QAbstractItemView.selectionChanged (self, QItemSelection 

This method is also a Qt slot with the C++ signature void 
selectionChanged(const QItemSelection&,const QItemSelection&).

This slot is called when the selection is changed. The previous 
selection (which may be empty), is specified by deselected, and the new 
selection by selected.
<end quote>

I can guess that "deselected" is one parameter, and "selected" refers to 
the other.  I cannot tell which is which.

Suggestion - The title should be the Python def line of the method. The 
main text should include a table containing
         The parameter name
         Its type
         if it is optional or mandatory
         Its purpose

2) When you call  setSortingEnabled(True)  on a QTreeView the model's 
sort routine is called twice.

No sort is necessary in my use case, because the data is already sorted 
correctly. However I would accept a single sort column 0, ascending.

Besides, sorting should *always* be done in the view and never in the 
model. Sorting is a matter of data presentation. A model may have many 
views - and each could sort in different orders without interfering with 
each other.  The view has the data.

So SortEnable should handle it all - and map the index back, so the data 
in the model need not move. If the view needs to know the domain of a 
column (numeric, string, character set), then it should ask the model.

This bug has been reported since PyQt 4.4 - and is still outstanding.

3) When the bug in 2) has finished sorting the data twice, it results in 
the header icon being in the wrong sense. Clicking the header continues 
to sort the data in the opposite direction to that indicated by the 
icon.  After clicking to another column and clicking back it does 
correct itself.  This only effects column 0.
4) My table has exactly 5 columns of data - 

If I return 5 from columnCount() then I don't get any headers! If I 
return 6 then the headers appear - and include an empty column on the right.

Anyone know a work-round for this?



More information about the PyQt mailing list