All Questions
Tagged with qt5 qgraphicsview
100
questions
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
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
1
answer
67
views
Two sync QGrapchisView layers miss aligned scene rect after zoom event, but aligned after pan events
I have two classes of edited QGrapchicsView, one (GraphicsView) shows lines and it enables zoom and pan. The second class (PolygonGrapchisView) only updates the scene rect to match that of the first ...
0
votes
1
answer
152
views
How to make the QGraphicsView size consistent with the size of the image and the main window?
I'm developing a graphic editor with Qt, and using a QGraphicsView to display the picture, and need to resize it so that it's consistent with the size of the image and the main window.
The following ...
1
vote
0
answers
50
views
Getting wrong name in mouse hover property in Qt
I am having QGraphicsScene which contains many digital gates ( AND,OR,NOR etc ) which are made up of Arc, Polyline, Circle, Straight line etc.
I am implementing a feature like, when I hover mouse over ...
1
vote
1
answer
35
views
How to easily recognize searched item in a dense QGraphicsScene?
I have a QGraphicsScene with many QGraphicsItem like circle, rectangle, polylines, arc etc.
Every QGraphicsItem has a name. And I have a Search feature which highlights searched items using that name. ...
0
votes
0
answers
172
views
How to deselect / dehighlight multiple items using QGraphicsScene::clearSelection()?
I have a QGraphicsScene which has 100+ items. Sometimes I need to highlight and dehighlight multiple items.
Here is the code:
HighlightObject(QEvent* event)
{
//Finding object under cursor
...
0
votes
1
answer
54
views
Error in typecasting of QGraphicsItemGroup in Qt
I am trying to create a digital gates symbols ( like AND,NAND etc ) using line, arc, circle. To do this I am using QGraphicsItemGroup also.
For example. If a symbol contains 3 lines, 2 arc and 1 ...
2
votes
0
answers
162
views
How to use wrapper class?
I have a QgraphicsScene which contains many QGraphicsItem. I am reading line, arc and circle's co-ordinates from a file and storing them in a map and when time comes to draw them, I iterate over that ...
0
votes
0
answers
161
views
How to color arc in Qt?
I have a QGraphicsItem which is made of Line, Arc's and Circle. I have drawn a digital gate XNOR using arcs and lines and circles and colored it with blue color.
So when I initially load it looks ...
0
votes
1
answer
98
views
How to use arc co-ordinates from .slib file to draw an arc in Qt?
I am trying to generate various gate symbols ( AND,NOT,XNOR,MUX etc) by reading .slib file.
But I faced a problem while reading an arc related co-ordinate from .slib file.
I am not understanding how ...
0
votes
1
answer
119
views
How to draw an arc between known points to draw XNOR gate in Qt?
I want to draw an arc between point E to point G , F to H ( I want to draw XNOR gate symbol )
I tried this way
path.moveTo(72,10); // for E --> G
QRect bound1 (52,10,20,60);
path.arcTo(bound1,90,-...
0
votes
1
answer
957
views
How to draw an arc between two known points in Qt?
I want to draw an arc between point B to point D and it should touch to point E. ( I want to draw AND gate symbol )
I tried this way
QPainterPath path;
path.arcTo(60,30,46,100,30*16,120*16); // ( ...
0
votes
0
answers
116
views
How to minimize Bounding Rect in qt?
In my view there are 2 lines. 1 Polyline, and 1 straight lines.
I am not able to select straight line. If I try to select it ,
polyline gets selected ( though I have not clicked on it )
Selection of ...
0
votes
1
answer
189
views
How to draw grid line only in a circle using QGraphicsItem
Please forgive the poor English in advance.
hello! I am currently implementing view widget using QGraphicsView & QGraphicsItem.
Is there any way to draw gridlines only inside a circle?
Rectangles ...