Does addition sequence of different lines into scene affects their selection through mouse in qt ?
-
In my QGraphicsView, I have 1 polyline ( p1) and 2 straight lines ( s1 , & s2 ) and I have shown left and right part of the polyline by Left and right respectively.
I am showing insertion sequence of p1, s1 and s2 into scene and which line I am able to select by mouse.
(seuence is from left to right ) i.e. left most will added 1st and right most will be added last.
s2 , s1, p1 - p1 and (s2 through it's left part it can be selected )
p1 , s2, s1 - all can be selected.
s2, p1, s1 - p1 , s1 and (s2 through its left part it can be selected )
s1, p1, s2 - p1 and s2 selected.
p1, s1, s2 - All are selected
s1, s2, p1 - p1 and (s2 only through its left part )I want every line gets selected, once we click on it. Addition sequence of such shaped polyline matters ?
Is there any way in Qt, through which I can resolve above problem ? -
In my QGraphicsView, I have 1 polyline ( p1) and 2 straight lines ( s1 , & s2 ) and I have shown left and right part of the polyline by Left and right respectively.
I am showing insertion sequence of p1, s1 and s2 into scene and which line I am able to select by mouse.
(seuence is from left to right ) i.e. left most will added 1st and right most will be added last.
s2 , s1, p1 - p1 and (s2 through it's left part it can be selected )
p1 , s2, s1 - all can be selected.
s2, p1, s1 - p1 , s1 and (s2 through its left part it can be selected )
s1, p1, s2 - p1 and s2 selected.
p1, s1, s2 - All are selected
s1, s2, p1 - p1 and (s2 only through its left part )I want every line gets selected, once we click on it. Addition sequence of such shaped polyline matters ?
Is there any way in Qt, through which I can resolve above problem ?@JonB @SGaist @ChrisW67 @jsulm Can you look into this problem ?
I found useful information : linkItems are drawn in the order they added to the scene. To move item to the front you can removeItem and then addItem back to the scene
Now I am understanding , why I am able to select the lines which are added last.
But then, how to access, the items which are added very early ?