I am attempting to use QTableWidget in conjunction with PyQt5 and QtDesigner to display images in a grid in the GUI. (I'm simulating an LED panel display.) I want each image to be changeable independently of the other images and to be spatially tangent upon the neighboring images in the grid. The problem I am having is that I cannot find a way to remove the cell padding so that I can make the images appear to form a continuous mosaic. Does anyone know if there is a way to do this?
Edit: Here is some more info:
class Home_Win(QMainWindow):
def __init__(self):
# Show GUI------------------------
QMainWindow.__init__(self)
self.ui = loadUi("bugpanel.ui", self)
blueLED = QTableWidgetItem(QIcon("img/blueLED.jpg"),'',0)
rows, cols = 16,32
for row in range(rows):
for col in range(cols):
self.tableWidget_2.setItem(0 , 0, QTableWidgetItem(QIcon("img/greenLED.jpg"),'',0))
self.tableWidget_2.setItem(0 , 1, blueLED)
What I want:
What I get: