PDA

View Full Version : Another QListWidget bug?



SkripT
13th April 2006, 11:21
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.

wysota
13th April 2006, 12:24
Why should moving icons change the order of the items in the model?

SkripT
14th April 2006, 09:38
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.

wysota
14th April 2006, 13:08
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?

SkripT
14th April 2006, 15:12
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 ;)

wysota
14th April 2006, 17:33
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.

SkripT
14th April 2006, 17:58
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) :crying: (I think that I still have not tried it with the new version of Qt)

wysota
14th April 2006, 17:59
Why do you need the rubber band so much?

SkripT
14th April 2006, 18:06
Why do you need the rubber band so much?

I'm in love with the rubberband it has a great body :D 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)

wysota
14th April 2006, 23:54
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.

SkripT
15th April 2006, 13:17
Ok thanks a lot wysota for the suggestion. I'm using Qt free for windowsXP so I think that I can't report bugs...

wysota
15th April 2006, 14:01
Of course you can.

SkripT
15th April 2006, 14:40
done! expecting response from the Trolls...