Results 1 to 4 of 4

Thread: QListwidget Icon

  1. #1
    Join Date
    Nov 2008
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Smile QListwidget Icon

    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...

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QListwidget Icon

    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

  3. #3
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QListwidget Icon

    I think jasplye meant how to store coordinates of items. there was thread on this forum, but as I know there was not solution.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  4. #4
    Join Date
    Nov 2008
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QListwidget Icon

    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.

Similar Threads

  1. Replies: 2
    Last Post: 12th October 2008, 14:42
  2. Mac application and the Dock Icon
    By sekelsenmat in forum Qt Programming
    Replies: 3
    Last Post: 26th September 2007, 10:23
  3. Setting an icon to an Item in a QlistWidget
    By LordQt in forum Qt Programming
    Replies: 18
    Last Post: 23rd August 2007, 22:24
  4. QListWidget in ListMode - still has icon space
    By high_flyer in forum Newbie
    Replies: 10
    Last Post: 30th March 2007, 19:43
  5. Replies: 13
    Last Post: 15th December 2006, 11:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.