I just managed to resolve the Issue creating a class: 

class Scroller(pg.QtGui.QScrollArea):

    def __init__(self):
        pg.QtGui.QScrollArea.__init__(self)

    def wheelEvent(self, ev):
        if ev.type() == QtCore.QEvent.Wheel:
            ev.ignore()

app = QtGui.QApplication([])
sa = Scroller()
screen_resolution = app.desktop().screenGeometry()
scwidth, scheight = screen_resolution.width(), screen_resolution.height()

win = pg.GraphicsWindow()
win.setFixedHeight((scheight*1740)/1080)
win.setFixedWidth(scwidth-20)
sa.setWindowTitle("Meteo Station Graph")
sa.setWidget(win)
sa.showMaximized()
pg.setConfigOptions(antialias=True)



 I dunnĂ² if this is the most correct way, but I think it's really simple 

Il giorno sabato 14 ottobre 2017 15:39:03 UTC+2, Nedo Bianchi ha scritto:
>
> Hi, I would like to simply disable mouse wheel scroll on QScrollArea, in 
> order to scroll down only by clicking on right scrollbar, but I can't find 
> any solution on the Internet.
>
> app = QtGui.QApplication([])
> sa = pg.QtGui.QScrollArea()
> screen_resolution = app.desktop().screenGeometry()
> scwidth, scheight = screen_resolution.width(), screen_resolution.height()
>
> win = pg.GraphicsWindow()
> win.setFixedHeight((scheight*1740)/1080)
> win.setFixedWidth(scwidth-20)
> win.addViewBox()
> sa.setWindowTitle("Meteo Station Graph")
> sa.setWidget(win)
> sa.showMaximized()
> pg.setConfigOptions(antialias=True)
>
>
> The problem is that I have a lot of graphs in my scroll area, and when I 
> try to mousewheel on one of them, the page will scroll up or down together 
> with the graph.
>
> Thank you in advance if you can help me with this problem.
>

-- 
You received this message because you are subscribed to the Google Groups 
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyqtgraph/a4ffccbe-80ec-4b4b-b80a-a518a547ec6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to