Add entry to QListWidget and resize to content

Sometimes is useful resizing a QListWidget to the size of its content.
This is one way to do it.

Don't forget resizing again when you remove an item.

.....................................................................................................

```c
void addEntry( QString name, QListWidget* list )
{
    QListWidgetItem* item = new QListWidgetItem( name, list, 0 );
  
    QFont font;
    font.setPointSize(10);
    font.setWeight(70);
    item->setFont( font );

    item->setIcon( QIcon(":/icon.png") );
       
    int iconSize = 22;                       // I know icon size

    int size = list->count()*iconSize + 2;

    list->setFixedHeight( size );
}
```

.....................................................................................................

Fast linked list without list

If you need a very fast way to iterate over a list of objects and call the same method on all of them, then here is a posible solution. Der...