tags:

views:

79

answers:

2

I want to load a number of images into a widget that will show me the images in a list. It can be many images so it needs to be fast, also I'd like to attach a check box for each image presented. What will be the best way to implement it in Qt 4.6?

+1  A: 

use Qlistview in icon mode and in the paint delegate handle the drawing part of tick mark.

Shadow
+2  A: 

If I understand your question, you want a QListView where each item in the list is composed of an image and a check box. If this is correct, then per QListView Documentation, you can have only icons for images. I'm thinking that this is why you are asking the question.

What you could do is use QTableView instead. You can style the table to look like a list box. And each item in the table can contain an image and a checkbox. To see how to add images to an item line, see the Pixelator Example. Based on personal experience, you may want to use the example as the starting point for your code. I've found this works the best for me.

The Checkboxes are a standard option for a column in the table.

photo_tom