The function that was causing problems because it was deprecated is QWheelEvent::orientation(), I was checking if the orientation is vertical and it didn't return that correctly after 5.2.
I'll do some tests on Qt5 when I have a chance but if your patch works I'll add something like that to the code (the accumulator can't be static because there are multiple widgets). On Mon, Feb 9, 2015 at 12:18 AM, Sylvain L. Sauvage < [email protected]> wrote: > Le dimanche 8 février 2015, 17:39:16 Leonardo Zide a écrit : > > The zoom amount isn't affected by the current model, it's > > always the same amount. > > Sorry, just an affirmative sentence I turned into a negative > after after I thought of testing with a lone 1x1 brick. Should > have deleted it altogether. > > > I just tried both the mouse wheel and > > the trackpad to zoom and I don't see anything like that (Qt4, > > Windows). > > Confirmed: Qt4 is Ok, Qt5 is stuttering. > > I tested other Qt5 applications with zoom on mouse wheel: they > are fine. > > By curiosity, I checked the code of one of them: Stellarium. > > First, they still use event->delta() with Qt >= 5.2.0. That > the function has been obsoleted doesn’t seem to make it non- > working for them. (Which should be expected: if the function > doesn’t work anymore, it should be completely removed from the > API/ABI, not hanging around doing nothing.) So I reverted > r.1765 and event->delta() still works in Qt5. > Well, was it really non functionning in r.1763/Qt5 and did I > just not scrolled enough (didn’t seem to me I didn’t tried > enough at the time), or did something else changed (doesn’t look > like it though).... > > Second, their handling of wheelevents is way more complex: > they use a timer and an accumulator to reduce the number of > events to handle. It’s mainly a fix for the Qt bug 22269 ( > https://bugreports.qt.io/browse/QTBUG-22269 ). That bug seems > to be confined to OS X and is about scrolling improperly > continuing. This is not exactly the problem I have. > Nevertheless, I thought about the problem of low delta values > and hacked an accumulator (diff attached) and ... it works! > > What I think happens is that Qt5 generates more WheelEvents, > with lower delta values (< 120), which precludes them to having > an effect. > > -- > Sylvain Sauvage > _______________________________________________ > Leocad mailing list > [email protected] > https://list.gerf.org/listinfo/leocad > >
_______________________________________________ Leocad mailing list [email protected] https://list.gerf.org/listinfo/leocad
