On 13 May 2018 at 17:53, Frank Rueter | OHUfx <[email protected]> wrote: > > 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)
I'm no expert, but maybe it has to do with the painter state, or something along these lines. Maybe you need to call saveState/restoreState? My 2 cents. Chris > > 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 > > -- > > > vfx compositing | workflow customisation and consulting > > > Your gateway to over 1,000 free tools... right inside of Nuke > > > _______________________________________________ > PySide mailing list > [email protected] > http://lists.qt-project.org/mailman/listinfo/pyside > _______________________________________________ PySide mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/pyside
