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
1
vote
0 answers

How to determine the visible coords of a QGraphicsPixmapItem?

I'm using PyQt to display images the following way (I'm omitting some tedious details just to show the general approach): class MyGraphicsView(QGraphicsView): def __init__(self, parent = None): super(MyGraphicsView,…
LKeene
  • 627
  • 1
  • 8
  • 22
1
vote
2 answers

Qt: Signals and Slots in QGraphicsPixmapItem class

I have inherited a class called GraphicsPixmapItem from QGraphicsPixmapItem in order to override/create some mouse events. The problem is that I want to emit a signal after some calculations are performed, but it looks like it's not possible unless…
ksb496
  • 835
  • 1
  • 7
  • 12
1
vote
1 answer

Strange drawing behavior for QGraphicsPixmapItem in a zoomed and rotated in QGraphicsScene

I have a QGraphicsPixmapItem in a QGraphicsScene which I then zoom into and rotate in a QGraphicsView. Everything works great if there is no rotation or if I don't zoom in too far, however when I am zoomed way in (pixels are very visible) and rotate…
Chris
  • 574
  • 7
  • 24
1
vote
1 answer

Simplifying a Qt program and I am having trouble displaying an image in Qt using QGraphicsScene

Both of these code segments load in an image. Code 1, loads an image and has a zoom function and Code 2 is supposed to only load an image. Code 1 works perfectly, but when I tried to simplify it, I lost the load image functionality. For some reason…
1
vote
1 answer

QGraphicPixmapItem double click event does not go to parent widget while QGraphicsTextItem send

I have a main widget in Qt and this widget contains a QGraphicsView and inside it QGraphicsScene. In scene I add QGraphicsPixmapItems and QGraphicsTextItems. In main widget I handle QWidget::mouseDoubleClickEvent ( QMouseEvent * event ), my items…
1
vote
0 answers

How to add visual effects on QGraphicsPixmapItem?

I am using Qt 5.5.0. I want to know a good way of adding (and removing) a simple effect on QGraphicsPixmapItem-s. More specifically I have multiple QGraphicsPixmapItem-s moving on the scene. When they collide I want one item to turn white for a…
dsalaj
  • 2,857
  • 4
  • 34
  • 43
1
vote
1 answer

qt - In QGraphicsScene how to catch a particular item

I have so many things in my QGraphicsScene. The situation is I am creating a chessboard, and is using Graphics scene. So the QGraphicsScene is having so many QGraphicsPixmapItems. Now In this how can I get the King. Update: In this…
prabhakaran
  • 5,126
  • 17
  • 71
  • 107
0
votes
0 answers

Replace rectangle of a QPixmap with another when using QGraphicsPixmapItem PYQT

I have a scene with QGraphicsPixmapItem, and show a QGraphicScene object like a rectangle. def setupUI(self): self.pixmap01 = QPixmap.fromImage(qImg) self.mainpic = QGraphicsPixmapItem(self.pixmap01) …
md.119
  • 29
  • 7
0
votes
1 answer

Scaling-Rotating functionality on QGraphicsPixmapItem

I searched many times over the internet if QGraphicView have functionality for rotating/scaling image and I had no success. What I want like every diagram program each image/shape has boundary points, so the user can scale or rotate the shape/image.…
0
votes
0 answers

MouseOver very slow when using QGraphicsView and many QGraphicsPixmapItem in QT6.4 and C++

I render a QGraphicsScene with 4 million tiles (QGraphicsPixmapItem) and in the QGraphicsView I can scroll performantly. On mouseover I draw a rectangle over the tile, but this is shown VERY sluggishly and bounces back and forth. With a few tiles…
SoulfreezerXP
  • 459
  • 1
  • 5
  • 19
0
votes
0 answers

Get ROI from zoomed image in QGraphicsScene PyQt5

There is added QGraphicsPixmapItem in QGraphicsScene. The image is inserted via the setPhoto method. The wheelEvent method zooms in or out on the image. If image is zoomed I would like to take the displayed part of the image as ROI (img[y:y+h,…
Pr.Syn
  • 99
  • 1
  • 7
0
votes
0 answers

How to draw a border / outline around a QPixmap

I am trying to add a black border around a QPixmap. I dumbly thought scaling it down would do it, but this wasn't the case, as you can see here: I've tried a bunch of things, QGraphicsPixmapItem(), QGraphicsDropShadowEffect(), but I think I'm…
Adam Sirrelle
  • 357
  • 8
  • 18
0
votes
1 answer

PyQt5 QGraphicsPixmapItem center of rotation

I am trying to make a simple speedometer using PyQt5 and Qt Designer. I have a problem due to the rotation of the speedometer arrow self.arrow. This is the code: class MyWin(QtWidgets.QMainWindow): def __init__(self, parent=None): …
Marko
  • 103
  • 5
0
votes
2 answers

How to open image when corresponding QGraphicsPixmapItem is clicked?

I'm constructing a GUI for showing photographs (from a folder) in a grid using QGraphicsScene and QGraphicsPixmapItem (code below). Now I want to open the corresponding original image when clicking on one of the QGraphicsPixmapItems. I overrode…
0
votes
0 answers

Qgraphics item getting slow

I started few months ago studying QT with c++ and how i could develop a game for college purposes. I have a space shooter game where the player is a Qgraphics item that constantly play animations (moving, idle, change weapon...) as well the…