Results 1 to 13 of 13

Thread: Another QListWidget bug?

  1. #1
    Join Date
    Jan 2006
    Location
    Catalonia
    Posts
    266
    Thanks
    44
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Question Another QListWidget bug?

    Hi all, I use a QListWidget setting the movement of the items to QListView::Snap. The problem is that everytime that I exchange the position between two items, when the list is painted again (for example if I maximize the window that contains the list) the items restore their old positions like if the drop process doesn't automaticly fix the final row position of the items. Could it be another bug in QListWidget or it's the correct behaviour? Could the problem come because I set the QListView::Adjust property? Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Another QListWidget bug?

    Why should moving icons change the order of the items in the model?

  3. #3
    Join Date
    Jan 2006
    Location
    Catalonia
    Posts
    266
    Thanks
    44
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Another QListWidget bug?

    Quote Originally Posted by wysota
    Why should moving icons change the order of the items in the model?
    I think that's it's exactly what the user expects to do when wants to move the icons (in my point of view), don't you think that? Think for example in a list where the user wants to sort the items in some way, if an item isn't in the correct position what the user probably will do is exchange the positions of the "invalid" items by draging and droping them in the correct position lo let them in the correct order.
    Last edited by SkripT; 14th April 2006 at 08:44.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Another QListWidget bug?

    Please look at the attached images. In your opinion, what should be the order of those items in the model on each of those pictures?
    Attached Images Attached Images

  5. #5
    Join Date
    Jan 2006
    Location
    Catalonia
    Posts
    266
    Thanks
    44
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Another QListWidget bug?

    Quote Originally Posted by wysota
    Please look at the attached images. In your opinion, what should be the order of those items in the model on each of those pictures?
    Sorry wysota I missed to say tha I have fixed the movement to snap

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Another QListWidget bug?

    So you expect the model to change the order when the views visual attribute is set to some value and not to change the order when the attribute is set to some other value? I wouldn't consider this the "default" behaviour. You have to implement it yourself if you need it.

  7. #7
    Join Date
    Jan 2006
    Location
    Catalonia
    Posts
    266
    Thanks
    44
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Another QListWidget bug?

    Quote Originally Posted by wysota
    So you expect the model to change the order when the views visual attribute is set to some value and not to change the order when the attribute is set to some other value? I wouldn't consider this the "default" behaviour. You have to implement it yourself if you need it.
    That's true, I think it so. The problem is that if I set the list with a fixed movement, the rubberband to select the items doesn't appears (as I comented in another post) (I think that I still have not tried it with the new version of Qt)

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Another QListWidget bug?

    Why do you need the rubber band so much?

  9. #9
    Join Date
    Jan 2006
    Location
    Catalonia
    Posts
    266
    Thanks
    44
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Another QListWidget bug?

    Quote Originally Posted by wysota
    Why do you need the rubber band so much?
    I'm in love with the rubberband it has a great body Sorry, It's just a joke, talking seriously I need the rubberband beacuse I need that the user has to be able to select some images from the list and with the rubberband this selection is "easier" in icon mode (try to make a selection without seeing the rubberband, it's very incomfortable)
    Last edited by SkripT; 14th April 2006 at 17:10.

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Another QListWidget bug?

    If you can have more than one row/column of icons, then I agree -- the band may be helpful. Did you report it to Trolltech? Anyway, you can fix it yourself easily either by using QRubberBand or by painting it directly in the paint event if the mouse button is depressed.

  11. #11
    Join Date
    Jan 2006
    Location
    Catalonia
    Posts
    266
    Thanks
    44
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Another QListWidget bug?

    Ok thanks a lot wysota for the suggestion. I'm using Qt free for windowsXP so I think that I can't report bugs...

  12. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Another QListWidget bug?


  13. The following user says thank you to wysota for this useful post:

    SkripT (15th April 2006)

  14. #13
    Join Date
    Jan 2006
    Location
    Catalonia
    Posts
    266
    Thanks
    44
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Another QListWidget bug?

    done! expecting response from the Trolls...

Similar Threads

  1. Segmentation Faul using addItem (QListWidget)
    By gnusar in forum Qt Programming
    Replies: 3
    Last Post: 8th November 2008, 09:27
  2. how to sync a QTreeWidget and a QListWidget?
    By zl2k in forum Qt Programming
    Replies: 2
    Last Post: 5th September 2008, 20:55
  3. QListWidget Problem
    By pmabie in forum Qt Programming
    Replies: 1
    Last Post: 7th October 2007, 06:52
  4. Replies: 13
    Last Post: 15th December 2006, 11:52
  5. keypress while editing an item in QListWidget
    By Beluvius in forum Qt Programming
    Replies: 3
    Last Post: 4th April 2006, 09:56

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.