Questions tagged [qgraphicsview]

A QGraphicsView is a class from the Qt toolkit which provides a widget for displaying the contents of a QGraphicsScene.

The QGraphicsView class is part of Qt's Graphics View Framework and is used to visualize the contents of a QGraphicsScene in a scrollable viewport.

The official Qt documentation can be found here for Qt 4.8 and here for Qt 5.

1128 questions
0
votes
1 answer

Trying to connect QGraphicsScene with custom QGraphicsItemGroup

I have a project on Qt that has a GUI with a QGraphicsView. Then, I have a class called 'GraphicsScene' that is a subclass of 'QGraphicsScene'. After, I have a class called 'Entidade' that is a subclass of 'QGraphicsItemGroup'. When I click on the…
GuiCavi
  • 53
  • 5
0
votes
1 answer

QGraphicsView dragMoveEvent, mouseMoveEvent, mousePressEvent used in the same time

In QGraphicsView, setDragMode(QGraphicsView::ScrollHandDrag); This line of code did what I want: scroll contents while dragging. However, if I have implemented mouseMoveEvent or mousePressEvent for my custom needs, the…
Alston
  • 1,166
  • 2
  • 13
  • 26
0
votes
1 answer

QGraphicsView shows artifacts after opening file dialog

I'm not terribly familiar with Qt's memory model especially when it comes to image handling. I'm created a blank pixmap and adding it to a QGraphicsView's scene. This seems to work correctly jumping between two sizes, but I've noticed I get…
voodoogiant
  • 2,118
  • 6
  • 29
  • 49
0
votes
0 answers

QInputDialog different behaviour on mouse click and Enter pressed

Hello I have written a program in which I add graphics items in a QGraphicsView. I have a GraphicsScene which is bigger than the view. I'm using QInputDialog's getText function to change the text of the graphics items. If I click the OK button with…
Expr
  • 25
  • 1
  • 5
0
votes
1 answer

subclassing qgraphicsview and qgraphicsscene

I have a custom QGraphicsView and a custom QGraphicsScene class. When I create a new custom view I pass in the custom scene to the constructor which calls setScene() on it. But later I am having problems when I call views() on my scene class and it…
0
votes
1 answer

QGraphicsView not drawing line items when zoomed in or moved?

I'm developing a small Qt application similar to the DiagramScene example. I have subclassed QGraphicsView instead of QGraphicsScene. My view is zooming in and out with the mouseWheel, I can drag it with the mouse and I can add Nodes and Links with…
Expr
  • 25
  • 1
  • 5
0
votes
2 answers

Pyqt QgraphicsItem context menu overriden by QGraphicsView contextmenu

I'm working in a classic QgraphicsView / QGraphicsScene / QGraphicsItem framework. I'm declaring a context menu in the QgraphicsView: self.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) …
Pic
  • 105
  • 2
  • 10
0
votes
2 answers

How to get the size of QGraphicsView that is in a layout?

I'm new to Qt programming and I am developing a drawing application. I have a class MyWidget which has a member QGraphicsView. MyWidget is a member of another class MainWidget (which has other widgets as well and all of them are in a…
Expr
  • 25
  • 1
  • 5
0
votes
0 answers

Qpixmap look blurred when using opengl viewport in QGraphicsview

I have used QPixmapItem to display the images in a QGraphicsview viewport. I'm loading thousands of pixmaps at a time. So I decided to set some options to cache the pixmaps I'm loading for the images. Here's what I've…
Wagmare
  • 1,354
  • 1
  • 24
  • 58
0
votes
1 answer

How to scroll multiple QGraphicsView when scrolling one of them (no scrollbars)

I have three QGraphicsView s each one with a different scene. I am trying to scroll all the views when the user is scrolling one of them. The scrolling is carried out by the user dragging in the QGraphicsView widget which calls…
Numa
  • 31
  • 8
0
votes
1 answer

Use more QGraphicsScenes

I want to display multiple QML Files on a QWidget. Because every Display should be an unique Object/Widget, I plan to use for every display an own QGraphicsView with an unique QGraphicsScene. These views can be added to a layout witch will be placed…
pck
  • 203
  • 2
  • 10
0
votes
1 answer

How to receive gesture events on a QGraphicsItem?

I already set: graphicsView->setAttribute(Qt::WA_AcceptTouchEvents); graphicsView->viewport()->setAttribute(Qt::WA_AcceptTouchEvents); graphicsView->grabGesture(Qt::PinchGesture); graphicsView->viewport()->grabGesture(Qt::PinchGesture); And I’m…
Tarantula
  • 19,031
  • 12
  • 54
  • 71
0
votes
2 answers

Block some mouse event of QGraphicsView

I have my own subclass of QGraphicsScene lied behind QGrapnhicsView (I did not override it). My scene handles some mouse events (double and single click). But in the same time I want my view will be scrollable by cursor…
Alex G.P.
  • 9,609
  • 6
  • 46
  • 81
0
votes
1 answer

How to get multitouch to work in QGraphicsView, Qt 5.0.2 in Windows 8

I am struggling with getting multi-touch to work on a couple of QWidgets that I have added to a QGraphicsView. I have created a subclass of QWidget in which I set up a QGraphicsScene and QGraphicsView. This is my (test) subclass of QWidget: #include…
Finitely Failed
  • 119
  • 3
  • 14
0
votes
1 answer

How to set QCamera on label

I've decided no to use OpenCV. I will use the QCamera class. Everything is working perfect to this moment. I can capture and save images wherever I want, but the problem is how I can set the camera to a label or graphics view? I mean, to see what is…
Rado G
  • 87
  • 1
  • 5
  • 14