PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 1140 - QModelIndex.sibling with just one parameter
: QModelIndex.sibling with just one parameter
Status: UNCONFIRMED
Product: PySide
Classification: Unclassified
Component: QtCore
: HEAD
: All All
: P5 enhancement
Assigned To: Hugo Parente Lima
:
:
:
  Show dependency treegraph
 
Reported: 2012-02-10 23:23 EET by Jochen Deibele
Modified: 2012-03-08 16:57 EET (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jochen Deibele 2012-02-10 23:23:27 EET
QModelIndex.sibling is right now defined as: 
sibling(row, column)
And you have to specify both, row and column. 

I find myself often writing sth like: 

index.sibling(index.row(), xcolumn)

So I have to repeat one already given parameter. And sibling should anyway
often be one of the direct neighbours ...


What I would like to see is: 

index.sibling(column=xcolumn)
or
index.sibling(row=xrow)

So one possible solution would be to add keyword arguments as f.ex.
sibling(row=None, column=None) and a decision within QModelIndex if one of them
is None to use the own row/column. 

another one would of course be index.sibling_row(xcolumn) but that would be not
so close to the Qt bindings ... 

Thanks for PySide and your attention.
Comment 1 Matti Airas 2012-03-08 16:57:52 EET
PySide is now a Qt-addon and uses Qt Project's JIRA tool for tracking bugs.
Please verify that the bug is still valid and re-submit it in the address
below:

https://bugreports.qt-project.org/

Sorry for the inconvenience!