you can rewrite this in following way:
Qt Code:
  1. QGrphicsPixmapItem* item = new QGraphicsPixmapItem(tempIcon.pixmap(100,QIcon::Normal,QIcon::On);
  2. item->setPos(100, 100);
  3. scene->addItem(item);
To copy to clipboard, switch view to plain text mode