[PyQt] Qt4/Qt5 incompatible results of QTableWidget.selectedItems()?

T.N.T. tnt at banza.net
Tue Jul 2 17:31:12 BST 2013


Hello

When I have a QTableWidget with the following settings:


   tw.setColumnCount(2)
   tw.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)

and say I have selected the first two rows, then tw.selectedItems() 
returns a list of 4 items.

Now in PyQt4 compiled with Qt4 the order is:

  [ c0_r0, c0_r1, c1_r0, c1_r1 ]

but compiled with Qt5:

  [ c0_r0, c1_r0, c0_r1, c1_r1 ]


Regards, T.


More information about the PyQt mailing list