mshemuni
27th February 2013, 00:26
Hi everyone.
There is a qgraphicsView and I made zooming enable with scroll ball. Now I want get coordinates when I click on it. However on zooming coordinates should change and I want it to return coordinates from image. Is it possible? Here my code:
def display(self, FilePath, displayDevice):
if os.path.isfile(FilePath):
scene = QtGui.QGraphicsScene()
scene.addPixmap(QtGui.QPixmap(FilePath))
displayDevice.setScene(scene)
def zoom(self, display, val):
display.scale(val, val)
There is a qgraphicsView and I made zooming enable with scroll ball. Now I want get coordinates when I click on it. However on zooming coordinates should change and I want it to return coordinates from image. Is it possible? Here my code:
def display(self, FilePath, displayDevice):
if os.path.isfile(FilePath):
scene = QtGui.QGraphicsScene()
scene.addPixmap(QtGui.QPixmap(FilePath))
displayDevice.setScene(scene)
def zoom(self, display, val):
display.scale(val, val)