Re: [PyQt] selecting a bezier curve

2013-04-14 Thread Christophe BAL
Thanks for all ! 2013/4/14 > Hi, > > I'd like to point out that, realistically, the QGraphicsView framework > is obsolete. Yes, it may still be around a while. > But: The new OpenGL based QtQuick 2.0 graphics stack is way better. > > I'm in the process of porting a C++ application from QGraphic

Re: [PyQt] selecting a bezier curve

2013-04-14 Thread Mathias . Born
Hi, I'd like to point out that, realistically, the QGraphicsView framework is obsolete. Yes, it may still be around a while. But: The new OpenGL based QtQuick 2.0 graphics stack is way better. I'm in the process of porting a C++ application from QGraphicsView to QtQuick 2.0, which used a lot of c

Re: [PyQt] selecting a bezier curve

2013-04-13 Thread Tom Brown
Sure! My solution is below. from math import sqrt from sys import argv from PyQt4.Qt import QApplication from PyQt4.QtCore import QPoint, QPointF, Qt from PyQt4.QtGui import ( QColor, QGraphicsItem, QGraphicsView, QGraphicsScene, QPainterPath, ) class View(QGraphicsView):

Re: [PyQt] selecting a bezier curve

2013-04-13 Thread Christophe BAL
Hello, can you give your solution ? Christophe. 2013/4/14 Tom Brown > Ah! I found the QGraphicsView.mapToScene() method. This solved my problem. > > Thanks! > Tom > > > On Sat, Apr 13, 2013 at 6:06 PM, Tom Brown wrote: > >> I've found that this problem isn't specific to a bezier curve. If I >

Re: [PyQt] selecting a bezier curve

2013-04-13 Thread Tom Brown
Ah! I found the QGraphicsView.mapToScene() method. This solved my problem. Thanks! Tom On Sat, Apr 13, 2013 at 6:06 PM, Tom Brown wrote: > I've found that this problem isn't specific to a bezier curve. If I change > the curve to a straight line, I observe the same problem. So, I would think >

Re: [PyQt] selecting a bezier curve

2013-04-13 Thread Tom Brown
I've found that this problem isn't specific to a bezier curve. If I change the curve to a straight line, I observe the same problem. So, I would think that it has something to do with the way I'm setting up the view. Any ideas would be appreciated. Thanks! Tom On Sat, Apr 13, 2013 at 5:15 PM, T

[PyQt] selecting a bezier curve

2013-04-13 Thread Tom Brown
I've created a simple application (see below) that draws a bezier curve. I want to give the user the ability to select the curve so they can move it around. However, I'm having trouble selecting the curve in an intuitive fashion. When I click on the curve, the point I click on is actually far away