mshemuni
5th November 2012, 16:00
Hi everyone. I'm going to make a gui for IRAF text based astronomical program.
I'll display images on this gui.
So there is a QGraphicsView and it must be talented for zooming.
I get QGraphicsView's name as gw and make zoom with sending w and h values to zoom function.
def zoom(self, gw, w, h):
gw.fitInView(0,0,w,h)
There is two problems:
1) I'm using a verticalSlider for zooming and when i slide it at first it zooming, there is no problem whit second one. But at third it zooming out. I watched slider's values there is no problem with them.(actually I limited slider's value between 1 and 99. But at zoom out when I using scroll-ball and at end still scrolling down slider return 1-2-1-2-1-2-1-2 values in order)
2) When I zoomed and put the screen's center somewhere and then zoomed again. Naturally center going to (0,0). How can I get center of displayed area?
Sorry for bad English.
I'll display images on this gui.
So there is a QGraphicsView and it must be talented for zooming.
I get QGraphicsView's name as gw and make zoom with sending w and h values to zoom function.
def zoom(self, gw, w, h):
gw.fitInView(0,0,w,h)
There is two problems:
1) I'm using a verticalSlider for zooming and when i slide it at first it zooming, there is no problem whit second one. But at third it zooming out. I watched slider's values there is no problem with them.(actually I limited slider's value between 1 and 99. But at zoom out when I using scroll-ball and at end still scrolling down slider return 1-2-1-2-1-2-1-2 values in order)
2) When I zoomed and put the screen's center somewhere and then zoomed again. Naturally center going to (0,0). How can I get center of displayed area?
Sorry for bad English.