I'm trying to show an image in QGraphicsView, but for some reason the top-right corner starts in the middle of the QGraphicsView.
Also, how to make it fit the QGraphicsView?
Here's my code:
Qt Code:
Mat frameMat; videoReader >> frameMat; _graphicsScene = make_unique<QGraphicsScene>(0, 0, 300, 300); ui.graphicsView->setScene(_graphicsScene .get()); _graphicsScene ->setBackgroundBrush(Qt::blue); _graphicsScene ->addItem(item);To copy to clipboard, switch view to plain text mode
Here what I get when I run my code:
Untitled.jpg
Bookmarks