Questions tagged [qgraphicspixmapitem]

QGraphicsPixmapItem is a class of Qt (a cross-platform application development framework).

QGraphicsPixmapItem is a class of Qt (a cross-platform application development framework). The QGraphicsPixmapItem class provides a pixmap item that you can add to a QGraphicsScene (Qt Documentation)

46 questions
5
votes
3 answers

QGraphicsItem : emulating an item origin which is not the top left corner

My application is using Qt. I have a class which is inheriting QGraphicsPixmapItem. When applying transformations on these items (for instance, rotations), the origin of the item (or the pivot point) is always the top left corner. I'd like to change…
Jérôme
  • 26,567
  • 29
  • 98
  • 120
2
votes
1 answer

Set transform origin point for an already transformed QGraphicsItem

I have a robotic hand which contains of two connected moving arms. when arm1 is being rotated, arm2 is also rotating around the same origin point of arm1. when arm2 is being rotated arm1 should not move and arm2 should rotate around arm2 origin…
Galal Ali
  • 21
  • 2
2
votes
1 answer

Is it possible to attach one QGraphicsPixmapItem to another?

I'm currently working with PyQt4 in Python and I haven't been able to find anything online about combining 2 different items in a GraphicsView class on a PyQt UI together. Is this possible? The goal is to anchor one QGraphicsPixmapItem to another…
Edgecase
  • 673
  • 1
  • 7
  • 23
2
votes
1 answer

Painting QGraphicsPixmapItem border on hover

I'm trying to create my own QGraphicsPixmapItem where I can active on hover mode and I want to paint a black border when I hover over the rect of the item, and go back to normal when I leave the rect space. I started this code, but don't know what…
Black Mage
  • 47
  • 4
2
votes
1 answer

How do I reimplement the itemChange and mouseMoveEvent of a QGraphicsPixmapItem?

I'm building a T Shirt Designer using PySide. For this, I've set up a QGraphicsScene with the image of the T Shirt as a QPixmapItem on the scene. To overlay the design on the T Shirt, I'm getting the design image PNG from the user and setting that…
2
votes
2 answers

QGraphicsView slow with lots of QGraphicsPixmapItem

I've made a small code to test QGraphicsView capabilities using QtCreator. The code is quite simple, just created a class thats inherited from QGraphicsView that has a QGraphicsScene on it. Fill the scene with lots of QGraphicsPixmapItem (in this…
2
votes
1 answer

Scaled and transform Qgraphicspixmapitem

I have a problem while scaling and transforming QGraphicsPixmapItem. I have created graphics editor in which I am using QGraphicsItem of initial size 100,100 and after that I am resizing and rotating it by setTransform() method. After that I am…
1
vote
1 answer

How to attach multiple lines to a single QGraphicsPixmapItem?

Currently, I'm joining two QGraphicsPixmapItem with a line and able to move them around, but when when I add a third QGraphicsPixmapItem and try to connect it to one of them, it breaks the previous joined line. Here is my current code : #include…
Toloka
  • 23
  • 5
1
vote
1 answer

How to join two QGraphicsPixmapItem with a QLine?

I have two QGraphicsPixmapItem added to my QGraphicsScene. Now I want to add a QLine connecting both of this QGraphicsPixmapItem and should be able to move around with QLine stretching like graph. I have looked into this Elastic Nodes Example, but…
Toloka
  • 23
  • 5
1
vote
1 answer

QGraphicsPixmapItem is not being positioned correctly

I need to move a QGraphicsPixmapItem through a circle that it is at the top left corner of the image. That is, when I grab with the mouse the circle, I need the top left corner of the image to follow the circle. I subclassed a QGraphicsEllipseItem…
1
vote
1 answer

QGraphicsPixmapItem doesn't show in QGraphicsScene

In the inherited class GraphicWidgetItem from QGraphicsItem, I create rectangles, a circle, and a picture. Everything is displayed except the picture. What am I doing wrong? CustomItem::CustomItem( QObject *parent): GraphicWidgetItem(parent) { …
1
vote
0 answers

Scale items position relative to the scene/view resizing

I'm developing a software using Qt. I have a QGraphicsView that can be resized. I want to let users load an image (some maps) as the background of the view and be able to place some markers on the image (QGraphicsPixmapItem) and move them around.…
Mosi
  • 1,178
  • 2
  • 12
  • 30
1
vote
1 answer

Filling a drawn path using QPainterPath in pyqt5

I have a QGraphicsView which an image is loaded into. I then made it so you can draw over the image with your pointer with QPainterPath and then the path is closed by connecting the beginning and end points. I am wondering how to have that region…
Amanda.py
  • 113
  • 10
1
vote
1 answer

Add ports to the QGraphicsPixmapItem object

I've created something like this. I have created a QGraphicsPixmapItem object that I can add to QGraphicsView. I want to add ports to these objects I created. And I want to make connections between these ports and the objects I have created. I…
1
vote
1 answer

QT collision detection between 2 QGraphicsPixmapItems

Link to project The interesting parts should be in gameengine.cpp's "launchSplash" -function and splashanimation.cpp The game creates the bubbles randomly in the acceptable are. The player's job is to shoot the bubbles with water drops. The water…
Grak
  • 27
  • 6
1
2 3 4