[PySide] how to drawing pixmap into header view

Frank Rueter | OHUfx frank at ohufx.com
Sun May 13 07:53:47 CEST 2018


Hi all,

I am trying to paint a simple icon into a header view without losing 
it’s default look.

I thought this would do it:

|class SequenceHeaderView(QtWidgets.QHeaderView): def paintSection(self, 
painter, rect, logicalIndex): super(SequenceHeaderView, 
self).paintSection(painter, rect, logicalIndex) 
painter.drawPixmap(rect.topLeft(), QtGui.QPixmap(pixmap_path) |

However, this will not draw the pixmap.

If I do NOT call super(...).paintSection(...) it will draw the icon but 
obviously lose all it’s default look.
What am I missing?

Cheers,
frank

​
-- 

ohufxLogo 50x50 <http://www.ohufx.com> 	
	*vfx compositing <http://ohufx.com/compositing.html> | *workflow 
customisation and consulting <http://ohufx.com/customising.html>* *
		*<http://ohufx.com/compositing.html>*
<http://www.nukepedia.com/nubridge> 	
	

Your gateway to over 1,000 free tools... right inside of Nuke 
<http://www.nukepedia.com/nubridge>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20180513/0b3e731d/attachment.html>


More information about the PySide mailing list