When to add images to the list of qt tableview, found that use the tableview icon to display images have a small problem, is the picture not centered, Then found in baidu solution, some bosses proposed using the proxy class, So I am happy the proxy class inheritance QItemDelegate, produced a doubt, A QLabel if my agent, so I can only go to load the fixed picture, can't go to load a late I specify image, or an online photo,
CodePudding user response:
You later also can call the specified label setPixmap method to set the background, but you need the address of a pointer to store the label for maintenance