mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-21 05:11:44 +02:00
Start playing on ENTER in artistview
BUG: TWK-204
This commit is contained in:
@@ -151,6 +151,20 @@ ArtistView::onItemActivated( const QModelIndex& index )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ArtistView::keyPressEvent( QKeyEvent* event )
|
||||||
|
{
|
||||||
|
qDebug() << Q_FUNC_INFO;
|
||||||
|
QTreeView::keyPressEvent( event );
|
||||||
|
|
||||||
|
if ( !model() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ( event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return )
|
||||||
|
{
|
||||||
|
onItemActivated( currentIndex() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ArtistView::paintEvent( QPaintEvent* event )
|
ArtistView::paintEvent( QPaintEvent* event )
|
||||||
|
@@ -74,6 +74,7 @@ protected:
|
|||||||
virtual void resizeEvent( QResizeEvent* event );
|
virtual void resizeEvent( QResizeEvent* event );
|
||||||
|
|
||||||
void paintEvent( QPaintEvent* event );
|
void paintEvent( QPaintEvent* event );
|
||||||
|
void keyPressEvent( QKeyEvent* event );
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onFilterChanged( const QString& filter );
|
void onFilterChanged( const QString& filter );
|
||||||
|
Reference in New Issue
Block a user