i have copied from the drap and drop demo :
Qt Code:
{ if (event->mimeData()->hasFormat("application/x-dnditemdata")) { QPixmap pixmap; QPoint offset; dataStream >> pixmap >> offset; newIcon->setPixmap(pixmap); newIcon->move(event->pos() - offset); newIcon->show(); newIcon->setAttribute(Qt::WA_DeleteOnClose); if (event->source() == this) { event->setDropAction(Qt::MoveAction); event->accept(); } else { event->acceptProposedAction(); } } else { event->ignore(); } }To copy to clipboard, switch view to plain text mode
i see the graphic on the scene in the view but
how do i add the pixmap to the Graphics Scene ? I have tried scene->addPixmap(pixmap) , , addItem, addWidget etc... pls help.
i am doing this so i can print the scene with the graphic .
Bookmarks