how to find the partial line segment inside the QPolygonF

I have a
QLineF line
QPolygonF polygonThis Line is Partially inside the and partially outside the polygon . I check with documentation http://doc.qt.io/qt4.8/qlinefmembers.html and http://doc.qt.io/qt4.8/qpolygonfmembers.html
I want to get coordinates of segments of QLineF which is inside the polygon
I could not way to find the coordinates of QLineF which is inside

@QtEnthusiast
QPolygonF
is actually a QVector of QLineF objects. So you are easily able to iterate over them.
The rest "simply" is then plain mathematics.

I was looking for some optimized algorithm for the same .May be O(n) complexsity

@QtEnthusiast You can ask Google

@QtEnthusiast
yes, but this is outofscope for Qt since this is solvable with mathematics.
I am sure you can find various algorithms/formulas on the web for this.