Hit checking is done based on the shape() and not boundingRect(), so provided that the former is implemented correctly, the line shouldn't interfere.