Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A scrollbar event when scrolling?

I need an event for detecting if an user has moved the scrollbar position to another one.

In other words, if the user does scroll up/down, would it be possible to catch a signal so I can know the scroll has been changed its position?

I think it's not important, but the scrollbar I refer to is inside a QGraphicsView.

Regards.

Edit:

QGraphicsView is for displaying items in the screen, and if those items are too big it shows the scrollbars I refer to. What I need is to know when the user changes the position of those scrollbars.

like image 929
Developer09 Avatar asked Aug 14 '11 23:08

Developer09


People also ask

What is scroll event in JavaScript?

Explain Scroll events in JavaScript. Explain Scroll events in JavaScript. The scroll event in JavaScript is fired when the user interacts with a scrollbar by moving it up or down.

What happens when the scroll value is changed by the button?

You will notice that when the scroll value is changed by the button's Click event, only the ValueChanged event is raised. In contrast, when the scroll bar is scrolled manually, the Scroll event is raised immediately after the ValueChanged event. private void AddMyScrollEventHandlers() { // Create and initialize a VScrollBar.

Is there a way to disable scrollbar scroll events?

You could try hijacking the mousedown and mouseup events and avoiding them when click on a scrollbar with your custom powered function. And the inverse for mousedownScroll and mouseupScroll events.

How do I trigger the scroll events?

You can trigger the scroll events in the following ways, for example: 1 Using the scrollbar manually 2 Using the mouse wheel 3 Clicking an ID link 4 Calling functions in JavaScript


1 Answers

Sliders have a sliderMoved(int value) signal, where value is the new position of slider.

like image 160
José Morais Avatar answered Oct 21 '22 03:10

José Morais