They probably could, but would it differ from using removeRows() and insertRows() in sequence? Now, because there are more than one drag operations (move, copy and link), it would make sense for all of them to have an own method -- moveRows(), copyRows(), linkRows() which would make the model framework more complicated.Originally Posted by yogeshm02
They could. But what about operations, which do not come from a view? It could make those operations more complex (one would have to implement many situations -- view A -- view A, view A - view B, non-view - view, view - non-view, non-view - non-view -- maybe even more).- Can drag&drop action from one view to another, both having same models, be made to work like a move operation?
They sometimes do, but you should submit a report anyway.Do Qt developers have an eye on this forum or I'll have to submit a wish (Can I?)?
That's how they should be used, right?I am using model/view classes extensively in my application. Models in my app are not only used to store data but are also used for anything which needs to be done with it and at times two views display data from single model.
Drag and drop is really associated with views, not models. This could be an argument against implementing move/copy/linkRows() into the model. It should be as simple as possible. The Interview framework is not perfect. If you try to explain us your problems, maybe we'll be able to help.Also, those who are working with custom models may have noticed very buggy behaviour of drag & drop operations. Right? Or there is there something seriously wrong with my implementation? I tried hard but failed to generate a smaller variation of my model to show you code.






Reply With Quote

Bookmarks