RecyclerView这个被誉为ListView和GirdView的替代品,它的用法在之前的一篇博文中就已经讲过了,今天我们就来实现RecyclerView的侧滑删除和长按拖拽功能,实现这两个功能我们只需要一个类--ItemTouchHelper ItemTouchHelper Google官方文档上是这么介绍的: This is a utility class to add swipe to dismiss and drag & drop support to RecyclerView. 意
所需待重写函数: [virtual] bool QObject::eventFilter(QObject *watched, QEvent *event); /* * Filters events if this object has been installed as an event filter for the watched object. * In your reimplementation of this function, if you want to filter the eve