use toDouble instead of toInt for Qt 5.1 compatibility