qgraphicsview Questions

1

I have a fairly complex QGraphicsView/Scene setup where by I have items with complex interactions. As such I want to unit test this to avoid creating bugs in already existing functionality. For on...
Baggywrinkle asked 30/4, 2013 at 12:20

2

Solved

I need to display MDI windows containing images in my application. I wanted to be able to drag-scroll the images using the right mouse button, zoom them using the mouse wheel, and also create polyg...
Boneblack asked 10/3, 2011 at 1:23

1

I skimmed through new features of Qt5 and Qt Quick and don't really understand how it differs from the Graphics View Framework (QGraphicsScene) feature wise. It uses QML but beside that: Can Qt Q...
Rabin asked 28/4, 2013 at 20:19

2

Solved

I have multiple QGraphicsItems in scene spread across different parts of scene. In application there are different modes in one of mode user can scroll the scene (palm drag mode). To achieve scrol...
Mirellamirelle asked 17/10, 2012 at 6:12

2

I subclassed QGraphicsScene and added the method mouseMoveEvent to handle mouse move events. I created a ruler on top of QGraphicsView and have the ruler tracking mouse movement. In QGraphicsScene:...
Heterophyllous asked 14/10, 2011 at 18:40

5

Solved

I have an app which is based on the Qt Graphics View framework. It's a jigsaw puzzle game which basically cuts a pixmap into smaller pixmaps (puzzle pieces) and displays them as QGraphicsItems in a...
Cromlech asked 11/10, 2011 at 11:0

1

Solved

For example, if I wanted to display the player's inventory in a game using a QGraphicsView, how could I enforce a grid-based view where dragging and dropping items always results in them being alig...
Nomen asked 24/2, 2013 at 17:1

2

Solved

I was trying to build a small UI using PyQt . It has a window , a button(Rotate) , and a polygon(rectangle) in a QGraphicsView. One aim of the app is to allow the user to rotate the polygon. That...
Harder asked 30/1, 2013 at 14:18

4

Solved

I'm going to start programming a 2D tile-based game in Qt and read about the QGraphicsScene and QGraphicsView classes which are intended for displaying and handling lots of 2D objects. My question...
Triecious asked 2/2, 2012 at 21:1

1

Solved

One amazing feature of QGraphicsView is its ability to scale itself with its scene's content (every QGraphicsItem inserted in the scene actually). The QPixmap that I have inserted scales correctly,...
Wilmoth asked 29/10, 2012 at 11:11

1

Solved

I've some difficulties with QGraphicsView and QGraphicsScene. When I zoom/unzoom in the scene and create items with mousePressEvent, I have an offset in the position. How can this be avoided? eve...
Rubberneck asked 3/9, 2012 at 14:35

1

Solved

I have a need to integrate a zoom slider for a QGraphicsView in Qt 4.x, I have a working implementation that goes something like this: connect(slider, SIGNAL(valueChanged(int)), customGraphicsView...
Belfort asked 30/7, 2012 at 14:55

2

Solved

Here is my code : void MainWindow::on_actionOpen_Image_triggered() { QString fileName = QFileDialog::getOpenFileName(this,"Open Image File",QDir::currentPath()); if(!fileName.isEmpty()) { QIm...
Phocis asked 21/8, 2011 at 12:0

2

Solved

I'm trying to change the cursor of a QGraphicsView while the ScrollHandDrag is on, but it doesn't seem to work. I can change the cursor if I disable the ScrollHandDrag but not while it's active, I ...
Stlaurent asked 8/6, 2012 at 16:32

1

Solved

I want to draw polygons in a QGraphicsScene but where the polygons has latitude/longitude positions. In a equirectangular projection the coordinates goes from: ^ 90 | | -180-------------------...
Fou asked 4/5, 2012 at 6:37

3

Is there a way to restrict the area where a QGraphicsItem like QRect can be moved when setFlag(ItemIsMovable) is set? I'm new to pyqt and trying to find a way to move an item with the mouse, and t...
Blessington asked 23/8, 2010 at 13:59

2

Solved

I am using a QGraphicsPolygonItem and I have noticed that it always connects the end-point with the start-point. I know that the polygon terms means exactly that, and what I am looking for is "pol...
Coenocyte asked 11/10, 2011 at 14:27

2

Solved

I have tried calling self.setStyleSheet("background: transparent; border: transparent;") on a QGraphicsView, but it still leaves a 1 pixel border on the top edge. I have also tried replacing border...
Greenebaum asked 6/9, 2011 at 20:42

2

Solved

I have a QGraphicsScene that is filled with QGraphicsItems, and the user is able to pan and zoom around to inspect all of the various QGraphicsItems. However, I would like to have a QGraphics...
Dworman asked 29/4, 2011 at 3:20

1

Solved

I'm currently building up a small Real Time Strategy 2D engine. And I wonder how to handle the many everchanging sprites that will eventually cluter my screen. FYI, I am not aiming at anything AA...
Mcfarland asked 4/4, 2011 at 17:54

1

Solved

I have an application that makes extensive use of the graphicsview architecture in Qt4 and I would like to start automated testing of the ui components, but I cannot find any resources related to w...
Mezcaline asked 5/1, 2011 at 20:20

3

I am using Qt and C++ as my environment. I draw a QGraphicsView in my UI, then create a scene and add lines to that it. I run through an array of 5000 points and draw lines connecting each point. Q...
Fabliau asked 15/10, 2010 at 13:18

1

Solved

I'm trying to implement drag'n'drop for a QGraphicsScene. Here are the events I've overloaded: void TargetScene::dragEnterEvent(QGraphicsSceneDragDropEvent *event) { bool acceptDrag = false; con...
Marras asked 14/11, 2010 at 13:43

1

How can I print the content of a QGraphicsView in Qt? Thanks a lot.
Savadove asked 27/9, 2010 at 11:3

1

Solved

I want to make something like a hud. I have a QGraphicsScene with a huge QPixmap, that I added to a much smaller QGraphicsView. Now I need to add some control elements, like QLabel, QPushButton and...
Encrust asked 10/9, 2010 at 9:37

© 2022 - 2024 — McMap. All rights reserved.