[Interest] Tree widget: rearrange elements
senseiwa at gmail.com
Mon Aug 27 12:33:19 CEST 2012
On 8/27/12 10:59am, Tibold Kandrai wrote:
> As I understood the task is this:
> You want Qt to handle the drag and drop, but you want to control whether
> you can or cannot drop the item.
> For this you need to override one of the drag events not the drop event.
> I think you need to use this:
> http://doc.qt.nokia.com/4.7-snapshot/qtreeview.html#dragMoveEvent and
> you have to accept or ignore the events here.
While I was awaiting, I found a workaround, setting a flag:
i->setFlags(i->flags() & (~Qt::ItemIsDropEnabled));
Which one would you suggest? Creating an event filter, or setting item
I'm at a crossroad...
More information about the Interest