I’m very new to Python and even newer to PyQt. I’ve managed to create a table, but want to add images in certain cells. I’ve read that I need to subclass the QTableWidget class, or possibly the QTableWidgetItem class and re-implement the QPaintEvent. If anyone has an example of what goes into re-implementing the QPaintEvent I would really appreciate it.
Thanks,
Stephen
Two ways of doing it, since you asked for the painEvent.
Credits: http://www.mail-archive.com/pyqt@riverbankcomputing.com/msg01259.html
Hope this helps.
Edit: Added requested solution using a QTableWidget subclass.