All Questions
Tagged with qt qgraphicsview
833
questions
-2
votes
0
answers
44
views
How to get the QGraphicsItem under the mouse cursor
I created a QGraphicsView in a QDialog and added some lines to it. I want to highlight the lines when they are hovered.
I tried the following, but I get a null QGraphicsItem.
bool QtdlUI::eventFilter(...
0
votes
1
answer
34
views
Qt QGraphicsView mouseMoveEvent works nonstop
For some reason using addWidget function in QGraphicsScene class makes the related QGraphicsView widget receive mouseMoveEvents without mousebutton pressed and mouse tracking off.
MyView.h :
#pragma ...
-1
votes
1
answer
51
views
Editing QGraphicsPathItems with the mouse on QGraphicsView
This tool allows me to "sculpt" QGraphicsPathItems with the mouse for my QGraphicsView. But whenever I move a path item to a different position I can only sculpt the item from the original ...
0
votes
0
answers
32
views
In QT6.5, when using QGraphicsView to center an image, the white space outside the image cannot be displayed, resulting in a centering failure
As shown in Figure 1, I want to implement clicking on the green rectangle to jump the green rectangle to the center, and if the green rectangle is closer to the border, it should be centered and ...
1
vote
1
answer
67
views
How does the QGraphicsView coordinate system work?
Following this tutorial, I wrote a little program with a QGraphicsView, and a paint function within a class that inherits QGraphicsItem, that can paint to that QGraphicsView. But here's where I'm ...
0
votes
1
answer
41
views
How to position QGraphicsItem on parents top right corner when ItemIgnoresTransformations flag is set?
I am trying to display text on the top right corner of a QGraphicsPixMapItem. I want the text to maintain a constant size on the screen, regardless of the size of the image, so I am using the ...
0
votes
1
answer
59
views
PyQt QGraphicsView size to be the same as QGraphicsVideoItem
I'm trying to make the view be the same size as the video whilst allowing it to resize to fill the available area, I'm unsure if I'm doing it right by setting a maximum size but it kind of works, the ...
1
vote
2
answers
37
views
QGraphicsView and QSplitter: collapsing and unfolding area does not restore image
I am trying to create a basic program that has two side-by-side panels: one with image, and one with text. I am using splitter to be able to resize both areas up to the point of completely collapsing ...
0
votes
0
answers
35
views
About itemAt in QGraphicsView in Pyside6
if event.button() == Qt.RightButton:
itemFromCoor = self.itemAt(event.pos())
if isinstance(itemFromCoor, ButtonCancel):
father = itemFromCoor....
0
votes
0
answers
142
views
QMediaPlayer inside QGraphicsView with gstreamer PySide6
I have tried to launch a gstreamer pipeline in Python using QGraphicsView with QMediaPlayer.
It works if I use QVideoWidget, however, I am unable to run it with QGraphicsView. I need QGraphicsView, ...
0
votes
0
answers
60
views
How to show an image using QGraphicsView without stretching them
I am trying to display an image using QGraphicsView keeping the same ratio when the window is resized. i.e. without stretching the image.
Unfortunately I am not succeeding.
I tried searching online a ...
0
votes
0
answers
59
views
Signals and threads in a Qt based application
I'm building a project where a client sends an image buffer to the server and this server shows the received image using a QGraphicsView.
Everything works properly except for the signal calling part.
...
0
votes
0
answers
55
views
How to load an image byte array into QGraphicsView?
I'm building a module for an application and, this module should take a print from the screen and show it into a QGraphicsView.
This is my Print Screen code that saves the taken photo into a jpg file:
...
0
votes
1
answer
50
views
Place QGraphicsView scrollbars beside rather than within QGraphicsView when there is room
My Qt application, which I am writing in PyQt6, contains a QGraphicsView. Depending on the size of the application window, the QGraphicsScene underlying this view may be too big to fit in the viewport,...
0
votes
0
answers
41
views
Selectively omit portions of QGraphicsScene displayed by QGraphicsView
Let's say I have a single QGraphicsScene which contains a QGraphicsPixmapItem. I want to render this scene in two separate locations on the screen, via two separate QGraphicsViews, but in different ...