Wild shot into the blue: QVariant conversion gone wrong? Expecting and int and getting a double, so the toInt() conversion fails?