Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix artist colum not being rearrangable
- Loading branch information
Showing
1 changed file
with
10 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,9 @@ | |
#include <QScrollBar> | ||
#include <QDrag> | ||
|
||
// HACK | ||
#include <QTableView> | ||
|
||
#define SCROLL_TIMEOUT 280 | ||
|
||
using namespace Tomahawk; | ||
|
@@ -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.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
dschmidt
Author
Member
|
||
setSortingEnabled( true ); | ||
sortByColumn( -1 ); | ||
setContextMenuPolicy( Qt::CustomContextMenu ); | ||
|
Tbh, I'd rather have a broken first column than start spreading all those fugly hacks in our code to fix Qt's ineptness.