[Development] How can I only select border not inside rectangle to select QGraphicsRectItem

Ch'Gans chgans at gna.org
Mon Oct 3 23:57:02 CEST 2016


On 4 October 2016 at 10:51, itviewer <assangema at gmail.com> wrote:

> Hi,
> I draw a rectangle with QGraphicsRectItem. it only has a border and not
> be filled. like this:
>
> when I click inside the rectangle,it will be selected,but I would like
> only click on the border  to select, not inside.
> how can i get it?
>

Reimplement shape(), and use QPainterPathStroker ?

Chris


> Thanks.
>
>
> ------------------------------
> itviewer
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20161004/62ee670d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1.png
Type: image/png
Size: 515 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20161004/62ee670d/attachment.png>


More information about the Development mailing list