PDA

View Full Version : QListwidget Icon



jasplye
27th November 2008, 08:36
I have created Qlistwidget with Icon viewmode.
I can drag and drop icon within the list view
But how do i know the position of the icon so that i may save the position and display icon at the same position when i next time start my program.

Thanks you...

aamer4yu
27th November 2008, 08:58
You can use the index / row of the listwidgetitem and store it in a file, along with the file name.
Next time read the info from file and load according to index :)

spirit
27th November 2008, 09:15
I think jasplye meant how to store coordinates of items. there was thread on this forum, but as I know there was not solution.

jasplye
27th November 2008, 09:17
Thanks for you quick reply.
But i still have the issue.
Let's say i have only one icon in Qlistwidget and i drag the icon to the empty place within the list view , i will always get the same index just as before drag.