Skip to content

Commit

Permalink
Fix artist colum not being rearrangable
Browse files Browse the repository at this point in the history
  • Loading branch information
dschmidt committed Jan 18, 2016
1 parent 5d950bd commit ddf0300
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/libtomahawk/playlist/TrackView.cpp
Expand Up @@ -45,6 +45,9 @@
#include <QScrollBar>
#include <QDrag>

// HACK
#include <QTableView>

#define SCROLL_TIMEOUT 280

using namespace Tomahawk;
Expand Down Expand Up @@ -83,6 +86,13 @@ TrackView::TrackView( QWidget* parent )
setEditTriggers( NoEditTriggers );

setHeader( m_header );

// HACK: enable moving of first column: QTBUG-33974 / https://github.com/qtproject/qtbase/commit/e0fc088c0c8bc61dbcaf5928b24986cd61a22777
QTableView unused;
unused.setVerticalHeader( header() );
header()->setParent( this );
unused.setVerticalHeader( new QHeaderView( Qt::Horizontal, &unused ) );

This comment has been minimized.

Copy link
@muesli

muesli Jan 18, 2016

Member

Tbh, I'd rather have a broken first column than start spreading all those fugly hacks in our code to fix Qt's ineptness.

This comment has been minimized.

Copy link
@dschmidt

dschmidt Jan 18, 2016

Author Member

Tbh, I can live with it. It's not nice, but users don't care about nice code, but about nice UX. Not being able to rearrange a column for no good reason ... isn't exactly user friendly. As long as it's just this small piece of code in one single location ...

setSortingEnabled( true );
sortByColumn( -1 );
setContextMenuPolicy( Qt::CustomContextMenu );
Expand Down

0 comments on commit ddf0300

Please sign in to comment.