Hi.
I have an application where a QGraphicsPolygonItem (objectA) has the following characteristics:
ScenePos: X=250 Y=125
Transform():
|----|---|---|
| 2 | 0 | 0 |
| 0 | 1 | 0 |
| 50 | 0 | 1 |
|----|---|---|
Now, I am creating and new QGraphicsPolygonItem (objectB) and setting its scenepos and Transform the same as object A:
obj...
I want to detect when the mouse cursor moves in over a QGraphicsItem while a mouse button is pressed, i.e. the button is pressed before the mouse enters the item. My first idea was to use hoverEnterEvent, but it doesn't seem to trigger when the left mouse button is pressed. My other idea was to use dragEnterEvent, but it doesn't seem to ...
I have one QGraphicsScene as the main scene with several movable QGraphicsItems in it and another QGraphicsScene on top of the main scene as an overlay. The overlay scene is exactly the same size as the user's display,whereas the main scene is much bigger, so it needs to be scrolled up and down automatically.
Well, if an item in the mai...
Ok, so I am using QT and C++ as my environment.
I draw out a QGraphicsView in my UI.
I then create a scene and add lines to that scene. I run through an array of 5000 points and draw lines connecting each point.
QGraphicsScene *scene = new QGraphicsScene();
QPen pen2 = QPen(Qt::blue, 8.0);
int j=1;
for (int i=1; i<5000; i++)
{
...
Hi guys
i want to draw triangler object in graphicsview by using qgraphicsitem. But I dont know how to implement bounding rect according to triangler.
...
I wonder if it is possible to select item that belongs to one group, without selecting whole group.
What I trying to make is a group of items, that can be moved (all items are moved together) but none of them can't be moved individually. But I want also to be able to select items inside this group and then do something with them, like r...