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))
那位大神帮我简化下代码!
python简化代码,在线等!
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
1条回答 默认 最新
悬赏问题
- ¥15 HLs设计手写数字识别程序编译通不过
- ¥15 Stata外部命令安装问题求帮助!
- ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
- ¥15 TYPCE母转母,插入认方向
- ¥15 如何用python向钉钉机器人发送可以放大的图片?
- ¥15 matlab(相关搜索:紧聚焦)
- ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
- ¥15 路易威登官网 里边的参数逆向
- ¥15 Arduino无法同时连接多个hx711模块,如何解决?
- ¥50 需求一个up主付费课程