mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-20 07:52:30 +02:00
Merge pull request #108 from teo/master
Workaround to force QtCurve to not draw branching primitives in SourceTreeView
This commit is contained in:
commit
36fcbe83b7
@ -838,6 +838,13 @@ SourceTreeView::drawRow( QPainter* painter, const QStyleOptionViewItem& option,
|
||||
QTreeView::drawRow( painter, option, index );
|
||||
}
|
||||
|
||||
void
|
||||
SourceTreeView::drawBranches( QPainter *painter, const QRect &rect, const QModelIndex &index ) const
|
||||
{
|
||||
if( !QString( qApp->style()->metaObject()->className() ).toLower().contains( "qtcurve" ) )
|
||||
QTreeView::drawBranches( painter, rect, index );
|
||||
}
|
||||
|
||||
|
||||
template< typename T > T*
|
||||
SourceTreeView::itemFromIndex( const QModelIndex& index ) const
|
||||
|
@ -89,6 +89,7 @@ private slots:
|
||||
|
||||
protected:
|
||||
void drawRow( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const;
|
||||
void drawBranches( QPainter *painter, const QRect &rect, const QModelIndex &index ) const;
|
||||
|
||||
virtual void paintEvent( QPaintEvent* event );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user