Questions concerning QTableView and QListView
I have to views that are QTableView and QListView, I could drag items from QTableView to QListView, I have some questions about this matter:
-If I drag items to the white space of QListView it gonna append the list, but if the list view is full ( the vertical scroll bar appear) there is no longer white space, so it's impossible to append items to the list view, I could only drag on the last item of the list and insert the new one between the last item and the rest. Is there anyway to add some white space to the end of the list?
-The QTableView items I had is really wide horizontally, so when I drag it has this big widget sticking to the mouse cursor. How can I change the UI of what I'm dragging?
-I want to add some button on QTableView items whenever the user selected an item (it works similar to when you select a song in Groove Music, two buttons will appear). How to do this?
- Don't remember for that one
- You can subclass your model and reimplement startDrag, there you can set the image you want on the QDrag object.
- Implement your own QStyledItemDelegate
@SGaist Hello thank for you answer. I want to know one more thing is that how could I perform a middle mouse scroll while dragging. I need to move items in a view but it doesn't allow me to scroll.
I don't know right now if it's implemented but it should rather be the view scrolling up/down when you are close to one of the uppper/lower edge.