im trying to find out in PyQT how can i set the Mousewheel event? i need it so i can attach it to the Qscroll area
the code im using is working fine. but the size is hardcoded. i need it to somehow dynamically adjust depending on how the wheel(on the mouse) is used.. like when i slide the mouse wheel up. the height of my frame extends(like 50pixels per tick) and vise versa.
self.scrollArea = QtGui.QScrollArea()
#set the parent of scrollArea on the frame object of the computers
self.scrollArea.setWidget(self.ui.Main_Body)
self.scrollArea.setWidgetResizable(True)
#add the verticalLayout a object on PYQT Designer (vlayout is the name)
#drag the frame object of the computers inside the verticalLayout
#adjust the size of the verticalLayout inside the size of the frame
#add the scrollArea sa verticalLayout
self.ui.verticalLayout.addWidget(self.scrollArea)
self.ui.Main_Body.setMinimumSize(400, 14000)
the last part is what i want to enhance. i dont want it to be hardcoded into a 14000 value. thanks to anyone who will help. and i hope that the given sample code can also help others in need.
)