Bill
17th July 2009, 13:22
Hello,
It's my first post here, so sorry if I'm starting a thread which already has been answered. I googled for the answer, but found nothing useful...
Anyway - I'm working on a project with a QGraphicsView-Scene-RectItem class implementation. The main functions available to the user should be the dragging (already done), selecting (done in 50%), resizing (problem here) and deleting rectangles (QGraphicsRectItems).
The problem I have now is with the ItemIsSelectable flag. I set it in the constructor of MyRectangle class, which inherits from QGraphicsRectItem. This allows for selecting the item, but I would really need to change the line style when the item gets selected (now it's barely noticeable). How can this be achieved? Should I reimplement the mousePressEvent? If so - how to deselect all other items on the scene besides the one under the mouse...
I will really appreciate any help,
Sending regards,
Bill
It's my first post here, so sorry if I'm starting a thread which already has been answered. I googled for the answer, but found nothing useful...
Anyway - I'm working on a project with a QGraphicsView-Scene-RectItem class implementation. The main functions available to the user should be the dragging (already done), selecting (done in 50%), resizing (problem here) and deleting rectangles (QGraphicsRectItems).
The problem I have now is with the ItemIsSelectable flag. I set it in the constructor of MyRectangle class, which inherits from QGraphicsRectItem. This allows for selecting the item, but I would really need to change the line style when the item gets selected (now it's barely noticeable). How can this be achieved? Should I reimplement the mousePressEvent? If so - how to deselect all other items on the scene besides the one under the mouse...
I will really appreciate any help,
Sending regards,
Bill