[Qt-interest] selectedRows broken in 4.5.0?

Acenes acenes at gmx.net
Thu Mar 12 12:39:20 CET 2009


The row is first selected by mouse (selection is indicated with blue 
background of the row), then an action button is clicked to trigger the slot 
where the issue is.

By debugging I saw that QItemSelectionModel::isRowSelected is no longer 
returning true in 4.5.0, so the issue seems to be in there.

I made both columns visible for a test, but that didn't change anything.
The column (which is hidden normally) is also disabled, so maybe that is 
causing the problem - did not check that yet.

I am on Windows XP, VS2005, Qt 4.5.0 commercial.


"Andreas Pakulat" <apaku at gmx.de> schrieb im Newsbeitrag 
news:20090312105947.GD22553 at neo.apaku.dnsalias.org...
> On 12.03.09 10:22:05, Acenes wrote:
>> I have a QTableView with two columns, one visible and one hidden. It is
>> initialized as
>>
>>     setSelectionMode(QAbstractItemView::ExtendedSelection);
>>     setSelectionBehavior(QAbstractItemView::SelectRows);
>>
>> Whe a row is selected then
>>
>>     selectionModel()->selectedRows()
>>
>> returns a list with one row in 4.4.3, while in 4.5.0 it will return an 
>> empty
>> list.
>
> Works fine for me, what signal(s) do you use to get notified when a row is
> being selected?
>
> Andreas
>
> -- 
> A long-forgotten loved one will appear soon.
>
> Buy the negatives at any price. 





More information about the Qt-interest-old mailing list