Hello!

I have a question which concerns models and items in models and probably a bit QVariant. The question is: why will not appear a picture after executing the code presented bellow?

Qt Code:
  1. QIcon ico(":/block.png");
  2. v1.setValue(ico);
  3. item2->setData(v1, Qt::DisplayRole);
  4. model->setItem(0, 0, item2);
  5. QTreeView *tv = new QTreeView;
  6. tv->setModel(model);
  7. tv->show();
To copy to clipboard, switch view to plain text mode 

And another question, which was born by my curiosity, is: Does QStandardItem class's method setData work only with primitive data, such strings, integers etc.? Does it depend on QVariant-class?