qgraphicsview Questions
1
Solved
I'm getting very unpredictable results using basic bearing calculations. What I need to happen is that as I draw these lines based on the angle of the dial, the lines need to uniformly get drawn in...
Winkelman asked 31/3, 2017 at 19:1
3
Solved
Why this:
graphics_view->fitInView(scene->sceneRect(), Qt::KeepAspectRatio);
doesn’t work as expected ? It isn't fitting the scene rect correctly, showing margins around it.
Hawkshaw asked 28/10, 2013 at 16:54
6
Solved
I have a QGraphicsTextItem parented to a QGraphicsItem. I want the QGraphicsTextItem to always reside directly above the QGraphicsItem, but I also want the text to remain the same size when the sca...
Torrlow asked 12/7, 2012 at 19:34
3
Solved
I draw few rectangles inside the QGraphicsView ; I use custom stipple pattern for these by creating a QBrush with my QPixmap. This gets displayed with the default zoom level as expected.
When I c...
Diatomite asked 19/12, 2012 at 18:4
2
Solved
I have a class derived from QGraphicsView, which contains QGraphicsItem-derived elements. I want these elements to change color whenever the mouse cursor hovers over them, so I implemented hoverEnt...
Percolation asked 30/5, 2010 at 21:23
5
Solved
I am using Qt's QGraphicsView — and QGraphicsItem — subclasses.
Is there a way to not scale the graphical representation of the item in the view when the view rectangle is changed, e.g., when zoomi...
Overdo asked 3/8, 2009 at 15:15
3
Solved
I would like to have a background image in my QGraphicsView that is always scaled (and cropped if necessary) to the size of the viewport, without scrollbars and without scrolling with the keyboard ...
Rhododendron asked 22/3, 2010 at 2:47
4
Solved
I use the Python-Qt bindings from PySide and I want to draw a scene with amongst others a rectangle and the rectangle is not fully visible because the view should only show a part of the scene wher...
Hargreaves asked 18/9, 2014 at 8:53
3
Solved
I am currently able to load my image into a grahpics scene, and then again into a QGraphicsViewer.
I am able to implement a zoom feature by dtecting a QEvent::Wheel and then calling the graphicsVi...
Fatigue asked 20/1, 2011 at 23:4
1
I have added QOpenGLWidget to QGraphicsView (don't use setviewport) via QGraphicsProxyWidget:
QSurfaceFormat format= QSurfaceFormat();
format->setSamples(4); //<== widget show black screen i...
Spirketing asked 9/2, 2015 at 19:10
1
I am writing a screenshot utility with PyQt, and the idea is take a screenshot of the whole desktop, then display it in a QLabel, make the window full screen and user selects a region by mouse.
Is...
Kaifeng asked 11/12, 2015 at 9:37
1
Solved
My LineItem inheriting from QGraphicsLineItem can change its pen width.
I have created a boundingRect that uses the QGraphicsLineItem::boundingRect adjusted by pads that get calculated based on pe...
Ichneumon asked 14/8, 2015 at 14:58
2
Solved
I'm trying to make sense of QGraphicsView and QGraphicsScene, specifically how to place graphics items and have them appear where I want them to. I'm also confused about when scroll bars will appea...
Bottle asked 29/2, 2012 at 3:38
1
I'm subclassing QGraphicsScene in PyQT and want to use Shift key (modifier) for multi-select items instead of control key.
I can do so by subclassing it and making my own mousePressedEvent, but t...
Cassella asked 3/4, 2013 at 0:30
2
Solved
I want to implement arc in QGraphicsScene. I want that on clicking of three points my arc should be drawn such that on clicking of three points arc is drawn where first point will be starting of ar...
Decease asked 13/11, 2014 at 4:48
2
Solved
I have two view whose perspectives are xy and xz. These views have their own scrollbars and x side of these views are equal. When i move scroll bar of x sides , i want x scrollbars to move simultan...
Drake asked 11/11, 2010 at 11:49
1
Solved
I defined class MyGraphicsView, a subclass of QGraphicsView. Than, I add a signal test() in MyGraphicsView. In my MainWindow class, I have MyGraphicsView* myView and I connect like:
connect(myView...
Adiana asked 10/4, 2014 at 10:49
2
Solved
In Qt's QGraphicsScene, if I wanna one item, just click it, and click another selectable item will make the selected item to be unselected. If I want to select multiple items, I'd use Ctrl-key. But...
Muslim asked 28/9, 2010 at 6:34
1
Solved
I've subclassed QGraphicsView for a custom canvas to be used in a CAD application. I've successfully reimplemented QGraphicsView::wheelEvent to check the keyboard modifiers for the control key and,...
Arthropod asked 10/5, 2013 at 5:8
1
Solved
I would like to draw a notification that always appears in the upper right corner of my QGraphicsView. However, QGraphicsItems positions are specified in scene coordinates, so if the user panned/zo...
Conchaconchie asked 23/8, 2013 at 20:23
3
Solved
I have a QGraphicsItem that has text on it. I want this text to be editable, so that if the user double-clicks it, it will enter an edit mode. It seems like the easiest way to do this would be to c...
Lemos asked 15/8, 2013 at 1:45
3
Solved
Hi I'm making an application that pulls data from a WFS and then displays those layers of data on a QGraphicsView on a widget. At the moment all layers are rendered and added to the same view meani...
Biflagellate asked 6/8, 2013 at 8:6
1
This question is related to: Forcing QGraphicsItem To Stay Put
I'd like to have a QGraphicsItem on a fixed location when moving around in the scene.
The suggested solution is to override the voi...
Boucher asked 28/6, 2013 at 20:35
1
Solved
I am trying to add an image to a QGraphicsView/QGraphicsScene so later I can paint simple geometries on it based on user's input. I need to make sure that the image fits in QGraphicsView regardless...
Zuniga asked 8/6, 2013 at 8:48
2
Solved
I have one QGraphicsScene to which I have added some instances of QGraphicsItem.
I need to display a particular section of my whole scene in individual views.
To do that, I want to create multipl...
Sorus asked 9/5, 2013 at 4:21
© 2022 - 2024 — McMap. All rights reserved.