[PyQt] currentRow and currentColumn is not updated when I click a combobox inside a cell of a QTableWidget
Hans-Peter Jansen
hpj at urpla.net
Fri Jan 21 17:56:09 GMT 2011
On Friday 21 January 2011, 15:23:21 Rodrigo wrote:
> Hi,
>
> I've just QComboBox cells in a column of my QTableWidget. I need to
> know the row and column where they are when the user changes the
> index of a ComboBox.
>
> I do this with currentRow() and currentColumn() with the SIGNAL
> ("currentIndexChanged (int)") of QComboBox, but it only works the
> first time. If I change another combobox after the first,
> currentColumn CurrentRow still always pointing to the values of the
> first combobox changed.
>
> Example:
>
> 1) An QComboBox had changed its index.
>
> CurrentRow = 5
> currentColumn = 0
>
> 2) Another QComboBox is amended:
>
> CurrentRow = 5 (should be 8!)
> currentColumn = 0
>
>
>
> But if I click a cell in another column before you click the next
> cell with combobox works properly, see:
>
>
> Example 2:
>
> 1) An QComboBox had changed its index.
>
> CurrentRow = 5
> currentColumn = 0
>
>
> 2) I click any cell in a column other than the last (last = 0), for
> example, cell line 3 and column 5.
>
> 3) Then when I change the QComboBox standing in line 8, it works,
> see:
>
> CurrentRow = 8 (must be 8! Ok)
> currentColumn = 0
>
>
> This is a bug in QTableWidget?
>
>
> Thanks,
>
> Rodrigo
This issue is missing a minimal runnable script that demonstrates your
claim.
Pete
More information about the PyQt
mailing list