Dear all,
In my program, I draw a line via two points, the line's parent class is QGraphicsItem.
I want to select a line when it is under mouse, but the boundingRect is not my expection.
The real boundingRect likes the rectangel(red line) in figure_1(left) , otherwise, I want to get the boundingRect likes figure_2(right). If I uses boundingRect likes figure_1, when I move mouse to the rectangle, the line(cyan line) will be selected, but, it is not under mouse currsor.
According to the Qt4's manual, I re-implement the two pure virsual function: boundingRect() && paint(...), if I do not use boundingRect(), How can I do it?
Thanks a lot !
Bookmarks