[Qt-interest] QListView::scrollTo() problem

Anthony Serdyukov uksus70 at gmail.com
Wed Dec 24 06:06:58 CET 2008


Yes, I thought about it and even tried. But I don't think it's a good
way because nobody can tell how much the delay should be.

2008/12/23 Alan M. Carroll <amc at network-geographics.com>:
> QTimer::singleShot
>
> I use this very frequently when I have timing issues like this (not quite as handy as perform:with:afterDelay, but usable).
>
> At 12:01 AM 12/23/2008, Anthony Serdyukov wrote:
>>Good day.
>>
>>I have QListView on my form.
>>At start up the model for the view is empty.
>>When user "opens document", the model is emitting modelReset() signal,
>>and the data is queried by the view.
>>
>>All was going well. But now I need to scroll list view to some item
>>during document opening. I tried to use scrollTo method, but it
>>failed.
>>My investigation told me that the view is still querying SizeHintRole
>>when I call scrollTo() method.
>>So, it cannot satisfy my request since the scrollbars range is
>>undefined yet. But this is just my supposition.
>>
>>What could you suggest?
>>
>>--
>>Regards,
>>Anthony
>>_______________________________________________
>>Qt-interest mailing list
>>Qt-interest at trolltech.com
>>http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>



-- 
Regards,
Anthony



More information about the Qt-interest-old mailing list