On Thu, Sep 04, 2008 at 11:11:16PM +0200, Vincent van Ravesteijn - TNW
wrote:
> >> It looks like currentRow() might return -1 sometimes
> >
> >You are right, if nothing is selected, it returns -1...
> >
> >Andre'
> 
> Please correct me if I'm wrong (I'm just trying to understand QT).
>  
> I was a little vague in the above sentence on purpose, because when I
> was experimenting with this code yesterday I noticed that even when
> nothing is selected currentRow() returns 0 (or incidentally something
> else > 0). That's why I added '&& formatLW->selectedItems().size() >
> 0' to the patch.

/*!
  \fn void QListWidget::currentRowChanged(int currentRow)

  This signal is emitted whenever the current item changes. The \a currentRow
  is the row of the current item. If there is no current item, the \a 
currentRow is -1.
*/

I am not sure this is related, though, and I am not in the mood to
investigate ;-}

Andre'

Reply via email to