Conversation
Hi Fadyosam I was going through your code I want to draw all the graphics item in your example by dragging mouse. So it will be helpful if you modify your code and upload.
|
Hi there, Sorry but I really don't have the time to modify the code however it's pretty easy you need to add the lines from the constructor of MainWindow that are responsible for creating items into the drop event of the QGraphicsScene for example (pixmap): Since the custom items inherits QGraphicsItem you can borrow the code for dragging and dropping available in one of the examples provided by Qt. |
|
hi, fadyosman, thanks for sharing. sample code: if both rect1 and rect2 are selected, the ui can not move. |
Hi Fadyosam I was going through your code I want to draw all the graphics item in your example by dragging mouse.
So it will be helpful if you modify your code and upload.