Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
UIにgraphicsViewがあり、このコードを使用してリソースから画像を設定しましたが、機能しません。
-ヘッダーファイル内:
QGraphicsScene *scene;
-cppファイル内:
scene = new QGraphicsScene(); scene->addPixmap(QPixmap(":/images/alert.png")); ui->graphicsView->setScene(scene);
コードの何が問題になっていますか?