qgraphicsscene Questions
2
hey want to drag this bezier curve when mouse button is pressed and moved..
I did this:
void MainWindow::mouseMoveEvent(QMouseEvent *e)
{
qDebug()<<"in mouse move - outside if";
if((e->b...
Presently asked 15/9, 2013 at 21:11
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
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
2
I'm a newbie to Qt/Embedded. I want to use QPainter to draw stuff on a QPixmap, which will be added to QGraphicsScene. Here is my code. But it does not show the drawings on the pixmap. It shows onl...
Craven asked 26/7, 2013 at 18:47
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
1
Solved
I have a custom implementation of qGraphicsScene and a custom qGraphicsItem that I click on, but the itemAt function never returns a value, even though I am fairly certain that I'm clicking on the ...
Murrain asked 4/6, 2013 at 13:58
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
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
1
Solved
I want to have moveable multicolor tooltip for QGraphicsItems. For example when I click on graphicsItem in scene, tooltip appears, then during dragging mouse tooltip should follow cursor. I can imp...
Armour asked 22/4, 2013 at 11:36
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
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
3
Solved
Googling suggests that it should.
But the dragdroprobot example implementation (on the parent Robot object) suggests not:
QRectF Robot::boundingRect() const
{
return QRectF();
}
Which is corre...
Armijo asked 16/9, 2011 at 17:27
1
Solved
I'm writing a Qt app that is based around a QGraphicsScene canvas with movable shapes on it, and I'm trying to integrate undo-redo functionality. For most functions like creation and deletion of sh...
Paschasia asked 31/1, 2013 at 16:57
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
I have a question about drawing specific arc on a scene. I have this information about arc:
Starting Koordinates,
Start Angle,
End Angle ,
Radius.
But I can't use them efficently with QPainter. ...
Underglaze asked 11/1, 2013 at 13:25
1
I create a custom QGraphicsItem. And overwrite the boundingRect() and paint().
QRectF myTile::boundingRect() const
{
return QRectF(xPos*10, yPos*10, 10, 10);
}
void myTile::paint(QPainter *paint...
Livelong asked 24/12, 2012 at 20:49
2
Solved
Is there a way to show a popup when the user right clicks on an empty portion of the scene?
I'm new at Qt and I've tried slots and subclassing, but to no avail.
No such slot and, respectively:
...
Invaluable asked 26/5, 2012 at 13:45
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
2
Solved
Following code should create the QGraphicsView widget which owns one QGraphicsScene having text inside of it:
#!/usr/bin/python
import sys
from PyQt4.QtGui import *
if __name__ == '__main__':
...
Rhomb asked 15/9, 2012 at 0:14
1
Solved
In a QGraphicsScene, I have a background set with a few QGraphicsItems on top of it. These graphics items are of arbitrary shape. I'd like to make another QGraphicsItem, i.e. a circle, which when p...
Ubald asked 15/6, 2012 at 17:6
3
Solved
Quick question, why does:
void roiwindow::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
QGraphicsScene::mouseMoveEvent(event);
qDebug() << event->button();
}
return 0 instead of...
Tortoiseshell asked 28/5, 2012 at 3:8
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
1
Solved
According to the QGraphicsItem destructor documentation, "It is more efficient to remove the item from the QGraphicsScene before destroying the item."
Why is that? I can't think of how it could ma...
Klump asked 2/5, 2012 at 20:56
© 2022 - 2024 — McMap. All rights reserved.