What error do you get? And there is no need to create a temporary pixmap on the heap. And you are surely looking for [CODE][/CODE].
Error msg that i get is fallowing:
QPixmap:perator=: Cannot assign to pixmap during painting
I started C++ and Qt just few weeks ago.
Qt Code:
QGraphicsPixmapItem *image; scene.addItem(image);To copy to clipboard, switch view to plain text mode
Whats aboutorQt Code:
To copy to clipboard, switch view to plain text modeQt Code:
image->setPixmap(bImage);To copy to clipboard, switch view to plain text mode
same problem...
i was googling and found that i am not the only one with this problem but didn't see any solutions to this.
Also, i do this inside constructor.
Where are you creating image ?
QGraphicsPixmapItem *image = new QGraphicsPixmapItem();![]()
i found what was the problem![]()
In my case, I called scene()->clear() before setPixmap(). So, all pointers to items becomes invalid;
I am sure the original poster is delighted to see this answer, 5 1/2 years later.
Bookmarks