QT application checking if the cursor is within or without a polygon