diff --git a/src/main.cpp b/src/main.cpp index 4a5916ad5..ec0b0f865 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -303,6 +303,17 @@ int main(int argc, char *argv[]) { IncreaseFDLimit(); QtSingleApplication a(argc, argv); + + // A bug in Qt means the wheel_scroll_lines setting gets ignored and replaced + // with the default value of 3 in QApplicationPrivate::initialize. + { + QSettings qt_settings(QSettings::UserScope, "Trolltech"); + qt_settings.beginGroup("Qt"); + QApplication::setWheelScrollLines( + qt_settings.value("wheelScrollLines", + QApplication::wheelScrollLines()).toInt()); + } + #ifdef Q_OS_DARWIN QCoreApplication::setLibraryPaths( QStringList() << QCoreApplication::applicationDirPath() + "/../PlugIns");