1
다음 코드를 사용하면 내 워크 스테이션 (QtCreator가 "수동"실행 중)에서 정상적으로 작동합니다. 하지만 Qt가 설치되지 않은 다른 PC에서는 QGraphicsPixmapItem이 표시되지 않습니다.QGraphicsPixmapItem이 배포 모드의 QGraphicsScene에 표시되지 않았습니다.
image = new QGraphicsPixmapItem(QPixmap(urlFile)); image->setZValue(-5000.0); scene->setSceneRect(QRectF(0, 0, image->pixmap().width() + 200, image->pixmap().height() + 200)); scene->addItem(image); view->setMaximumWidth(image->pixmap().width() + 200); view->setMaximumHeight(image->pixmap().height() + 200); qreal centerX = (scene->width()/2.0) - (image->pixmap().width() /2.0); qreal centerY = (scene->height()/2.0) - (image->pixmap().height() /2.0);; image->setOffset(QPointF(centerX, centerY));
이유를 알고 계십니까? qgif4.dll, qjpeg4.dll : :)
folowing DLL을 JPG 및 GIF를 사용하는 데 필요한 이유
+1하지만 다음 번에 Qt docs를 읽으십시오;) – ismail