Hi,
I'm struggling to get this working:
I have a QGraphicsView with a QGraphicsScene. The scene is filled with QGraphicsRectItems. I am able to fill in a QComboBox with strings (box1, box2 etc.) corresponding to the number of the rectangles. I also use the rectangle's position as the QVariant in the QComboBox...
This is where the problem starts. I would like to be able to select the appropriate rectangle on the scene by selecting the 'box..' entry in the QComboBox. This works when the rectangles do not change position. When someone moves a rectangle, its position changes thus rendering the QVariant in the QComboBox useless...
So - is there a better way of achieving a selectable list of QGraphicsItems? I know that QGraphicsItem has the itemChange event, but I don't have an idea how to propagate the new position to the QComboBox (which is a part of the main window)...
Thanks in advance for your help,
Regards,
Bill
Bookmarks