- 论坛徽章:
- 1
|
def tab1(self,x):
#tab=QtGui.QTableWidgetItem()
#tab.setSelected(1)
for i in self.visi.sizeTab.colorbuck.selectedItems():
if i.row()==0:
s=QtGui.QImage(r'listimage\ab (1).jpg')
self._tools.label_16.setPixmap(QtGui.QPixmap.fromImage(s))
if i.column()==1:
s0=QtGui.QImage(r'listimage\c.png')
self._tools.label_16.setPixmap(QtGui.QPixmap.fromImage(s0))
if i.row()==1:
s1=QtGui.QImage(r'listimage\ab (2).jpg')
self._tools.label_16.setPixmap(QtGui.QPixmap.fromImage(s1))
if i.column()==1 and i.row()==1:
s1=QtGui.QImage(r'listimage\ab (3).jpg')
self._tools.label_16.setPixmap(QtGui.QPixmap.fromImage(s1))
if i.row()==2:
s1=QtGui.QImage(r'listimage\ab (4).jpg')
self._tools.label_16.setPixmap(QtGui.QPixmap.fromImage(s1))
if i.column()==1 and i.row()==2:
s1=QtGui.QImage(r'listimage\ab (5).jpg')
self._tools.label_16.setPixmap(QtGui.QPixmap.fromImage(s1))
if i.row()==3:
s1=QtGui.QImage(r'listimage\ab (6).jpg')
self._tools.label_16.setPixmap(QtGui.QPixmap.fromImage(s1))
if i.column()==1 and i.row()==3:
s1=QtGui.QImage(r'listimage\ab (7).jpg')
self._tools.label_16.setPixmap(QtGui.QPixmap.fromImage(s1))
求大神帮我简化下代码,! |
|