QAbstractItemView::dragMoveEvent( event );
}
+void PlListView::keyPressEvent( QKeyEvent *event )
+{
+ //If the space key is pressed, override the standard list behaviour to allow pausing
+ //to proceed.
+ if ( event->modifiers() == Qt::NoModifier && event->key() == Qt::Key_Space )
+ QWidget::keyPressEvent( event );
+ //Otherwise, just do as usual.
+ else
+ QListView::keyPressEvent( event );
+}
+
void PlTreeView::startDrag ( Qt::DropActions supportedActions )
{
plViewStartDrag( this, supportedActions );
plViewDragMoveEvent( this, event );
QAbstractItemView::dragMoveEvent( event );
}
+
+void PlTreeView::keyPressEvent( QKeyEvent *event )
+{
+ //If the space key is pressed, override the standard list behaviour to allow pausing
+ //to proceed.
+ if ( event->modifiers() == Qt::NoModifier && event->key() == Qt::Key_Space )
+ QWidget::keyPressEvent( event );
+ //Otherwise, just do as usual.
+ else
+ QTreeView::keyPressEvent( event );
+}
private:
void startDrag ( Qt::DropActions supportedActions );
void dragMoveEvent ( QDragMoveEvent * event );
+ void keyPressEvent( QKeyEvent *event );
};
class PlTreeView : public QTreeView
private:
void startDrag ( Qt::DropActions supportedActions );
void dragMoveEvent ( QDragMoveEvent * event );
+ void keyPressEvent( QKeyEvent *event );
};
#endif