qgraphicsscene Questions
4
Solved
I'm pretty new to C++/Qt and I'm trying to create an application with Visual Studio C++ and Qt (4.8.3). The application displays images using a QGraphicsView, I need to change the images at pixel l...
Gosser asked 26/11, 2012 at 23:2
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
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
2
In my project I'm using a QGraphicsScene and adding / removing items all over the code.
Now I want to get notified whenever a QGraphicsItem gets added or removed. Many Qt classes have notification...
Yoshida asked 22/10, 2012 at 11:35
2
Solved
I am quite new to Qt. I am having troubles in inserting a QImage to a scene. Could somebody please tell me how to add a QImage to a QGraphicsScene?
Jeopardize asked 11/5, 2011 at 6:22
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
1
Solved
I see some people say if you want to put QGraphicsScene's origin of coordinates at the origin of QGraphicsView, i.e. top-left corner. You need to let both of them have the same size.
So here is wh...
Tackling asked 21/4, 2019 at 7:48
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
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...
Leupold asked 6/5, 2017 at 23:24
1
Solved
I am trying to connect two QGraphicsItems by straight line (QGraphicsLineItem); by clicking with middle mouse button on first object, then hover on second object and after I release it, it should d...
Penninite asked 2/5, 2018 at 11:54
3
Solved
I have a scene which has fixed dimensions from (0;0) to (481;270):
scene->setSceneRect(0, 0, 481, 270);
Inside of it, I have a custom GraphicsItem and I can move it thanks to the flag ItemisM...
Smacking asked 27/10, 2012 at 18:9
1
Solved
I'm getting very unpredictable results using basic bearing calculations. What I need to happen is that as I draw these lines based on the angle of the dial, the lines need to uniformly get drawn in...
Winkelman asked 31/3, 2017 at 19:1
3
Solved
Why this:
graphics_view->fitInView(scene->sceneRect(), Qt::KeepAspectRatio);
doesn’t work as expected ? It isn't fitting the scene rect correctly, showing margins around it.
Hawkshaw asked 28/10, 2013 at 16:54
5
Solved
I am using Qt's QGraphicsView — and QGraphicsItem — subclasses.
Is there a way to not scale the graphical representation of the item in the view when the view rectangle is changed, e.g., when zoomi...
Overdo asked 3/8, 2009 at 15:15
2
Solved
I'm trying to determine the point where a hitscan projectile's path (basically a line, but I've represented it as a QPainterPath in my example) intersects with an item in my scene. I am not sure if...
Growing asked 7/7, 2013 at 13:24
1
Solved
I have a QGraphicsScene which contains custom objects (with QGraphicsItem as base class). I can retrieve these objects with:
foreach (QGraphicsItem* item, items()) {
if (item->type() == Custom...
Involved asked 14/9, 2015 at 14:50
2
I have a class instance that needs to be accessed by some other classes.
It would be quite cumbersome to pass the instance always down the construction chain.
I tried to avoid global variable, si...
Glover asked 27/4, 2015 at 7:43
2
Solved
I'm trying to make sense of QGraphicsView and QGraphicsScene, specifically how to place graphics items and have them appear where I want them to. I'm also confused about when scroll bars will appea...
Bottle asked 29/2, 2012 at 3:38
1
I'm subclassing QGraphicsScene in PyQT and want to use Shift key (modifier) for multi-select items instead of control key.
I can do so by subclassing it and making my own mousePressedEvent, but t...
Cassella asked 3/4, 2013 at 0:30
1
according to the Qt specification QGraphicsScene is a viewless
data model of QGraphicsItems.
I have a tool which can be used in windowed and in non-windowed mode
(when providing commandline argumen...
Kittykitwe asked 5/2, 2015 at 7:32
2
Solved
I want to implement arc in QGraphicsScene. I want that on clicking of three points my arc should be drawn such that on clicking of three points arc is drawn where first point will be starting of ar...
Decease asked 13/11, 2014 at 4:48
1
Solved
I want to add a gif animated image in QLabel that add into the QGraphicsScene.
My code is here:
QLabel *lbl = new QLabel;
QMovie *mv = new QMovie(":/Images/sun.gif");
mv->start();
lbl->setWi...
Breakwater asked 6/7, 2014 at 5:14
3
Solved
I want to develop an application with two main widgets one is a text editor and the other one is for graphic viewer.
The basic idea is to let the user hover over any block of code in the text ar...
Cornelia asked 26/9, 2013 at 12:6
1 Next >
© 2022 - 2024 — McMap. All rights reserved.