QT: fixed weird invalidating bug