2013年9月15日星期日

[Android] listwidget how to achieve massive image preview does not consume memory

I idea is to use listwidget to preview pictures, guaranteed listwidget several pictures in the three screens so much, used to ensure that slide and glide buffer . But how to get the size and scoll listwidget sliding signal it ? Great God , please help . .
------ Solution ---------------------------------------- ----
scrolling can be : QScrollArea :: QScrollBar :: sliderMoved (int value) or valueChanged (int value) you can see for yourself . .
Get Dimensions : qwidget :: size or geometry .... so many functions can not satisfy you?
------ Solution ---------------------------------------- ----

can set the size of the space , the default is 10M, but you can set to 100M, when the newly added pictures if space than 100M , it will follow the caching algorithm is not needed picture kicked , and add a new image .
------ eference --------------------------------------- < br> big trouble god can say details? these functions will signal you ?
------ eference --------------------------------------- < br> I want to know how to capture sliderMoved change then triggers my images pre-loaded .
------ eference --------------------------------------- < br> and I need like ah
------ eference --------------------------------- ------
you how to solve ?
------ eference --------------------------------------- < br> put preview narrow, placed QPixmapCache in
------ eference -------------------------- -------------
QPixmapCache how much space ?
------ eference --------------------------------------- < br> are thumbnails, can not consume much memory , try it.
------ eference --------------------------------------- < br> now use is the memory storage, but the picture is too large, memory consumption began to increase.
So I would like to find a good solution. Great God of trouble to teach you experience points .
------ eference --------------------------------------- < br> For example, I have 1000 pictures , the cache can only load 900 , then my 10 how to do it ?
------ eference --------------------------------------- < br> how to force ico to account for the location ah ?
------ eference --------------------------------------- < br> basically solved without using the cache , with a scrollbar 's valueChanged signal. dynamic loading, with a default ico QPixmap pointer. Pointing to a bmp. Then replace pictures valueChanged dynamic , dynamic memory for the release of the old pictures . Dynamic loading , similar to the windows folder thumbnail display. windows folder thumbnail is dynamically loaded .

没有评论:

发表评论