Fix userSpaceScaleFactor deprecation.

Port of https://github.com/qtproject/qt/commit/a06a0e0ae6f967be0da5171285fda475261d21f1.