PDA

View Full Version : Controlling inertial scroll (Mac)



thru
11th April 2011, 18:42
Hi all,

Anyone knows if there's a way to know when the QWheelEvent in a mac corresponts to simulated "inertial scrolling"? If you want to use the mouse wheel event for something other than scrolling with no inertia, for example rotating an image, you get a stream of events and I can not guess a way to deduct they are real or simulated inertial.

Intercepting TouchEvents may be a solution but you would have to figure out all the behaviors depending on types of mice (for example multitouch with two fingers, magic mouse with one a other possible implementations) and probably leaving gaps for other devices or configurations.

thanks!

thru
22nd May 2011, 10:37
As a followup, I've found this OsX doc that gives a programatic way to disable intertial scrolling for the app, may be of use to someone:
http://developer.apple.com/library/mac/#releasenotes/DriversKernelHardware/RN-MagicMouse/_index.html


NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];

NSDictionary *appDefaults = [NSDictionary dictionaryWithObject:@"NO"

forKey:@"AppleMomentumScrollSupported"];

[defaults registerDefaults:appDefaults];

Is it possible to implement this on a qt project?.... or alternatively could that setting be effective if placed on the info.plist of the app?