EDIT: Edited to ask one question instead of 2 plus clarification.
I have found similar solutions such as this (printed below) for adding an image background to a widget, but this example is for QLabel. I am trying to add an image to QListWidget which does not have a setpixmap() method as suggested in the example. I am trying to set an image as the background on the ListWidget just like I would set a background-color to a color.
import sys
from PySide2 import QtCore, QtGui, QtWidgets
app = QtWidgets.QApplication(sys.argv)
pixmap = QtGui.QPixmap('/Users/mymac/Downloads/ecg_measure.png')
label = QtWidgets.QLabel()
label.setPixmap(pixmap)
label.show()
app.exec_()
Unfortunately, the docs for PySide2 are not very helpful and assume the reader already knows all the details they skip over. I tried using various methods from parent classes, but have no guide for the syntax, and nothing workded yet.