qgraphicsview Questions

7

Solved

I've been pulling my hair out with this one for hours. There's a thread here about it, but nothing seems to be working. QGraphicsView::rect() will return the width and height, but the left and top ...
Pinkiepinkish asked 31/8, 2009 at 1:32

2

Solved

I am using QPainter and QPolygon classes to paint polygons over an image. I need the user to be able to edit this polygons by dragging the points in them. The QPolygon and QPainter classes don't ha...
Cuevas asked 11/10, 2018 at 2:7

1

I have problem using QGraphicsItem class. There is a base_parent, base_part, part_1, part_2. The base_parent is the parent of the base_part. part_1 and part_2 are children of the base_part. What I...
Tabbi asked 28/7, 2016 at 11:35

5

I'm new to Qt development so I've being trying to research a solution to a user interface I need to design. My project is to simulate players in an online game moving around a global map. To repres...
Rounders asked 26/11, 2011 at 15:45

2

Solved

I am working on a custom QGraphicsItem that has two anchor points, and I want to be able to rotate the item around these anchors when the user interacts with them. I have implemented a mousePressEv...
Platelet asked 5/4, 2023 at 21:27

3

Solved

I am using python and Qt Designer to implement loading tiff images and to enable Pan and Zoom on some mouse event (wheel - zoom, press wheel - pan). I was looking into some options and classes tha...
Vanillin asked 19/2, 2016 at 15:19

5

Solved

I have used QGraphicsView, QGraphicsScene classes in order to show a picture in a widget like this: m_Scene->addPixmap(QPixmap(fileName)); m_View->setScene(m_Scene); How I can show .gif an...
Karate asked 14/7, 2010 at 16:17

5

Solved

I'm working on program which shows users some picture they select. I would like to fit this picture in QGraphicsView's frame, but the picture appears smaller than the frame. So here's my code: imag...
Raconteur asked 10/6, 2013 at 16:32

1

I am learning QT and I am puzzled by the difference in performance of QLabel and QGraphics view while panning. I read a huge 36Mpixels (D800) jpeg file into either QLabel or QGraphics objects and ...
Flooded asked 21/9, 2012 at 0:27

2

Solved

How can I reset the scale of a Graphics View regardless of any previous scale that was applied? Using scale() multiplies the scale I give it to the previous one: ui->graphicsView->scale(0.1, ...
Jewfish asked 23/8, 2016 at 12:55

2

Solved

I want to get mouse position in my pyside2 application.(not desktop mouse position that QCursor gives) and I tried two way. Bellow is my code. import sys from PySide2 import QtGui, QtWidgets, QtCo...
Lasky asked 20/9, 2018 at 16:22

2

I want to make a QGraphicsScene and show it in QGraphicsView. I want to scroll the scene by middle mouse button and make rubber band selection by left button. But I don't know how to make the rubbe...
Ostler asked 9/3, 2017 at 10:30

3

Solved

In my application I want to use QGraphicsItemGroup for grouping items into one item. I played with it a little and not sure using it because when I want to catch events, events are merged together ...
Dearborn asked 11/6, 2010 at 8:49

5

Solved

So i have a QGraphicsScene with various items. Some of the can take the same coordinates in the scene. When I display the scene the ones displayed on top are the ones which were added last. Is ther...
Sisterhood asked 15/6, 2014 at 15:38

5

Solved

I want to know the size of a certain QGraphicsView. Its size isn't fixed because the widget is part of a grid layout. I tried using this->ui->myGraphicsView->width() and its height equival...
Artima asked 24/2, 2011 at 10:52

13

Solved

I have an application with a QGraphicsView window in the middle of the screen. I want to be able to zoom in and out using a mouse wheel scroll. Currently I have re-implemented QGraphicsView and o...
Cacilie asked 1/10, 2013 at 10:12

4

here i have a scene and a associated view ,then i hava a position in the scene coordinates.I want to set the center of the viewport with the position.How can i do it? I try to use the translate() f...
Assiniboine asked 30/1, 2013 at 17:56

3

Solved

I am building a node graph in a QGraphicsView and I am currently implementing panning. I used the following question "how to pan images in QGraphicsView" to start but the panning is limited by the ...
Anlace asked 6/10, 2013 at 9:5

3

Solved

just like the title says i'm trying to draw inside an existing QGraphicsView. The window I generated using QT Designer, and I would like to draw a matrix of 16x16 squares inside the QGraphicsView. ...
Bog asked 26/5, 2017 at 3:42

1

Solved

I am trying to overlay some graphics(QtGraphicsView) on top of video player(QVideoWidget). i have already tried setting QtGraphicsView subclass stylesheets to transparent and background brush and n...
Towney asked 22/12, 2018 at 22:25

1

Solved

I have a scene like this class Scene(QtWidgets.QGraphicsScene): def __init__(self, parent=None): super(Scene, self).__init__(parent) def mousePressEvent(self, event): print('scene pressed') ...
Loganloganberry asked 9/10, 2018 at 19:58

6

Solved

I want to have a QGraphicsView that never scrolls automatically. Similar: Basically, my question is identical to http://developer.qt.nokia.com/forums/viewthread/2220 , but that thread didn't rece...
M asked 14/1, 2011 at 9:42

2

I re-implemented QGraphicsView to have the scene zoomed with a mouse wheel event. The scene contains several QGraphicsPixmapItem. The wheel event calls QGraphicsView::scale(qreal sx, qreal sy) Eve...
Hercegovina asked 18/7, 2013 at 21:31

2

Solved

I'm developing a CAD application using Qt 5.6.2 that is required to run in cheap computers at the same time that it needs to handle thousands of items in the same scene. Because of that, I had to m...

1

Solved

I'm confused on how to click and draw a rectangle over a picture that the user has loaded in. I found a few examples that I tried to follow but nothing seems to work and I am not sure why or how to...
Japonica asked 3/11, 2017 at 18:19

© 2022 - 2024 — McMap. All rights reserved.