qgraphicsitem Questions
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 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
5
Solved
I want to create a pixmap from a graphicObject, so i can set the pixmap as an icon
I have a Block class derived from QGraphicsPathItem and i tried using:
Block *block = new Block();
QRect rect =...
Sakhuja asked 15/5, 2018 at 20:16
3
Solved
Pretty basic question but I couldn't find a solution through google. In QT when a graphics item is selected, there's a border around it. I was wondering how I can set this border to be invisible. T...
Gong asked 11/6, 2012 at 17:48
4
Solved
Does a simple method exist to select part of a QGraphicsItem (like for a selection, with a dashed border for example), despite its position in the QGraphicsScene
I've found QGraphicsItem::ItemIsSe...
Hammers asked 20/1, 2012 at 10:4
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
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 have a list that contains QGraphicsItem.
This list allows me to draw lines.
I looked in the documentation but I did not see how can we save the points in a file?
Then read the points of the file ...
Fichte asked 24/7, 2018 at 6:48
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
2
Solved
I have a class derived from QGraphicsView, which contains QGraphicsItem-derived elements. I want these elements to change color whenever the mouse cursor hovers over them, so I implemented hoverEnt...
Percolation asked 30/5, 2010 at 21:23
2
Solved
I would like to be able to rotate a QGraphicsItem based on its center, and scale it based on the top left corner.
When I try to combine rotation and scaling, the item also apparently moves...
#in...
Sweeten asked 2/9, 2015 at 14:51
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
Solved
I can't understand how scaling and rotation are applied to QGraphicsItem.
I need to be able to apply rotation and scaling (not necessarily keeping aspect ratio) and I get fully unexpected results....
Hoenack asked 24/8, 2015 at 16:4
1
Solved
My LineItem inheriting from QGraphicsLineItem can change its pen width.
I have created a boundingRect that uses the QGraphicsLineItem::boundingRect adjusted by pads that get calculated based on pe...
Ichneumon asked 14/8, 2015 at 14:58
1
Solved
I am trying to rotate a QGraphicsPixmapItem child. For other QGraphicsItem, rotation and scaling work fine. But for a QGraphicsPixmapItem, if the size does not keep aspect ratio, instead of rotatio...
Consentient asked 5/8, 2015 at 22:53
2
Solved
1) How can I wrap text in a QGraphicsTextItem to fit a fixed rectangle, with width and height ?
Right now I am experimenting with creating a text, getting its bounding rectangle, and resizing it t...
Brae asked 17/6, 2015 at 14:53
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
4
I am drawing a line using mouse clicks. The line is drawn using paint function as:
painter->drawLine(start_p, end_p);
The bounding rect of line is defined as:
QRectF Line::boundingRect() co...
Supersonic asked 9/10, 2014 at 6:21
2
Solved
I am trying to understand how it is possible to redefine the way items are selected and transformed (once selected) in a QGraphicsScene. For example changing length of a line, move a line, change a...
Lagerkvist asked 26/3, 2014 at 16:3
2
Solved
I would like to resize the boundingRect() of my QGraphicsItem using the mouse.
To build this I found this topic.
So I managed to make it work for the right, the bottomright and the bottom of my bo...
Precognition asked 21/3, 2014 at 10:21
1
Solved
I am trying to build a python class around QGraphicsRectItem (PySide or PyQt4) that provides mouse interaction through hover-overs, is movable, and re-sizable. I have pretty much everything working...
Koto asked 6/3, 2014 at 13:53
1
Solved
I would like to draw a notification that always appears in the upper right corner of my QGraphicsView. However, QGraphicsItems positions are specified in scene coordinates, so if the user panned/zo...
Conchaconchie asked 23/8, 2013 at 20:23
3
Solved
I have a QGraphicsItem that has text on it. I want this text to be editable, so that if the user double-clicks it, it will enter an edit mode. It seems like the easiest way to do this would be to c...
Lemos asked 15/8, 2013 at 1:45
1 Next >
© 2022 - 2024 — McMap. All rights reserved.