[PySide] Can't override paintEvent on QTableWidget

Frank Rueter frank at ohufx.com
Tue Aug 30 07:48:19 CEST 2022


Hi all,

I am trying to override the paintEvent in a QTableWidget to draw a custom
progressbar into the table area until the table data is loaded. I have done
this with other widgets in the past but the table widget won't let me do
this.
I am getting these errors:
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::setBrush: Painter not active

Here is a simple code snippet for testing:
https://gist.github.com/frueter/a5b722926a847c291d1472a6fd145dbf

When I inherit from QWidget it works fine.
Is this sort of thing not possible with a QTableWidget?

Cheers,
frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20220830/6a1a70bc/attachment.htm>


More information about the PySide mailing list