qgraphicsview

What is the grab-command (leftMouseButton) for QGraphicsView.ScrollHandDrag

Hi, you can enable mouse dragging by setting setDragMode(QtGui.QGraphicsView.ScrollHandDrag for QGraphicsView. Then you can drag the QGraphicsScene by holding the leftMouseButton. But I want to drag with the middleMouseButton not leftMouseButton. How can I do that? I tried setCursor(QtCore.Qt.ClosedHandCursor) but it isn't working. Ha...

How to use QGraphicsView in Qt?

I am new to Qt. First look at the image. http://i225.photobucket.com/albums/dd200/saravanan_comp2001/sample.png I need to create above like in Qt. If I click the circle then, I need to give one popup message like this "You clicked 2 circle", I need to add the circle in run time in any location. how to implement this in Qt using QGrap...

Qt4 QGraphicsView: How-to set QPen on float position

Hi, I've a QGraphicsView with an image and a custom cursor. The cursor is made out of two QPen-DotLines. A x-axis dotLine and a y-axis dotLine. The cross of the two lines is the mouse-cursor position. The problem, when I zoom in, the cross is not more under the mouse-cursor position. For example, when the values of the mouse-cursor are...

How to move a QGraphicsItem to another scene without loosing the mouse grab?

I have one QGraphicsScene as the main scene with several movable QGraphicsItems in it and another QGraphicsScene on top of the main scene as an overlay. The overlay scene is exactly the same size as the user's display,whereas the main scene is much bigger, so it needs to be scrolled up and down automatically. Well, if an item in the mai...

How to draw triangler by using GraphicsView's QGraphicsItem class.

Hi guys i want to draw triangler object in graphicsview by using qgraphicsitem. But I dont know how to implement bounding rect according to triangler. ...

Resizing a QGraphicsItem to take up all space in a QGraphicsView, problems when window is resized

Hi, I have a QGraphicsItem (actually, a QDeclarativeItem) and I want it to take up the entire visible space of the QGraphicsView (again, its actually the derived QDeclarativeView class) to which it was added. Normally, you can use QDeclarativeView::setResizeMode(QDeclarativeView::SizeRootObjectToView) and QDeclarativeView will automatic...

Big QPixmaps crashes with OpenGL

Hello! I'm programming a QGraphicsView that has a lot of images. But when I display a JPEG with resolution 8528 x 1128 px (a panorama image), the QGraphicsPixmapItem does not render. It just displays a black square. Images of "normal" size renders good. I have not tried to find the "magick limit" for what sizes the problem occures on. ...