void FractalForm::drawImage(const QImage& image) { pixmap_ = QPixmap::fromImage(image); QGraphicsScene *scene = new QGraphicsScene(pixmap_.rect(), widget.graphicsView); QGraphicsPixmapItem *graphicsItem = new QGraphicsPixmapItem(pixmap_, scene->activePanel()); graphicsItem->setPixmap(pixmap_); // graphicsItem->setAcceptedMouseButtons(Qt::LeftButton | Qt::RightButton); scene->setSceneRect(0, 0, image.width(), image.height()); scene->addItem(graphicsItem); widget.graphicsView->setMaximumSize(pixmap_.width() + 10, pixmap_.height() + 10); widget.graphicsView->setScene(scene); widget.graphicsView->show(); }