qt - How to put several QImage in a QGraphicsView? -


i have scene several items added. problem when items displayed, overlapping. there way indicate in qgraphicsview or qgraphicsscene position each item should appear?

yes, have use qgraphicsitem::setpos() method. suppose added qgraphicspixmapitem, :

qgraphicsscene *scene = ... ; // scene qimage image = ... ; // qimage want add scene qpixmap pixmap = qpixmap::fromimage(image) ;  // add image item scene qgraphicspixmapitem * imageitem = scene->addpixmap(pixmap) ;  // modify item's position in scene coordinates qpointf imagepos = ... ; // whatever scene pos want imageitem->setpos(imagepos) ; 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -