1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-22 08:52:12 +02:00

Hide headers for related artists treeview in artistinfowidget. Don't ask my why it has to happen when it's already displayed.

Fixes TWK-310
This commit is contained in:
Leo Franchi 2011-08-06 23:33:31 -04:00
parent c6a65a5ba4
commit ce4328c0c3
2 changed files with 11 additions and 1 deletions
src/libtomahawk/widgets/infowidgets

@ -72,10 +72,12 @@ ArtistInfoWidget::ArtistInfoWidget( const Tomahawk::artist_ptr& artist, QWidget*
connect( Tomahawk::InfoSystem::InfoSystem::instance(), SIGNAL( finished( QString ) ), SLOT( infoSystemFinished( QString ) ) );
// Apparently headers can only be removed when it's already visible / layed-out
QTimer::singleShot( 0, this ,SLOT( removeHeaders() ) );
load( artist );
}
ArtistInfoWidget::~ArtistInfoWidget()
{
delete ui;
@ -223,3 +225,10 @@ ArtistInfoWidget::changeEvent( QEvent* e )
break;
}
}
void
ArtistInfoWidget::removeHeaders()
{
for ( int i = 1; i < ui->relatedArtists->header()->count(); i++ )
ui->relatedArtists->header()->hideSection( ui->relatedArtists->header()->logicalIndex( i ) );
}

@ -90,6 +90,7 @@ private slots:
void infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output );
void infoSystemFinished( QString target );
void removeHeaders();
private:
Ui::ArtistInfoWidget *ui;