[PyQt] Reporting Bugs in PyQt/Qt

Phil Thompson phil at riverbankcomputing.com
Mon Nov 29 13:06:53 GMT 2010


On Mon, 29 Nov 2010 12:42:53 +0000, Ian <hobson42 at gmail.com> wrote:
> Hi Everyone
> 
> I have four bugs to report. Where should they be reported?

PyQt bugs should be reported on this mailing list.

Qt bugs should be reported to Nokia.

> 1) The PyQt documentation contains a lot of things like this:  at 
>
http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qabstractitemview.html#selectionChanged
> 
> <quote>
> QAbstractItemView.selectionChanged (self, QItemSelection 
>
(http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qitemselection.html),
> 
> QItemSelection 
>
(http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qitemselection.html))
> 
> 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

The lack of argument names in the documentation is a bug.

> 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.

If it's a bug then it's a Qt bug.

> 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.

This is Qt.

> 4) My table has exactly 5 columns of data - 
> ['Name','Ref','Street','Town','Contacts'].

This is Qt.

> 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?
> 
> Regards
> 
> Ian

Phil


More information about the PyQt mailing list