QPushButton を GraphicView に配置したいのですが、ボタンが表示されませんか?
プロットごとに新しいウィンドウを作成しています。各プロットには、機能のためにいくつかのボタンを配置したいと考えています。ビューを別のタイプのウィンドウに配置する必要があるかどうかわかりません...もしそうなら、どうすればよいですか? どうも
QGraphicsScene *scene = new QGraphicsScene();
QPixmap image;
image.load(fileInfo.filePath(), 0);
scene->addPixmap(image);
scene->setSceneRect(image.rect());
QGraphicsView *view = new QGraphicsView();
view->setScene(scene);
view->setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "My Plot"));
view->resize(1000, 1000);
view->show();
QPushButton *m_button6 = new QPushButton("ok", view);
m_button6->setGeometry(QRect(QPoint(50, 50), QSize(50, 50)));
connect(m_button6, SIGNAL(released()), this, SLOT(handleButton5()));