add treeWidget Demo
This commit is contained in:
parent
b95c424c3e
commit
b5efbdf8dd
1 changed files with 2 additions and 2 deletions
|
@ -42,10 +42,10 @@ class MyTable(QTableWidget):
|
||||||
self.setVerticalHeaderLabels(["第一列", "第二列"])
|
self.setVerticalHeaderLabels(["第一列", "第二列"])
|
||||||
#设置表头
|
#设置表头
|
||||||
lbp = QLabel()
|
lbp = QLabel()
|
||||||
lbp.setPixmap(QPixmap("Male.png"))
|
lbp.setPixmap(QPixmap("youPicture.png"))
|
||||||
self.setCellWidget(1,1,lbp)
|
self.setCellWidget(1,1,lbp)
|
||||||
#在表中添加一张图片
|
#在表中添加一张图片
|
||||||
twi = QTableWidgetItem(" 新海诚")
|
twi = QTableWidgetItem("Graph")
|
||||||
twi.setFont(QFont("Times", 10, ))
|
twi.setFont(QFont("Times", 10, ))
|
||||||
self.setItem(1,0,twi)
|
self.setItem(1,0,twi)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue