Hi C Gui Programming Using Qt Succesfully Creating User Interface Based Picture Supposed D Q43885635
Hi, I have C++ GUI programming using Qt.
Here I have succesfully creating the user interface.

Based on the picture above, I am supposed to draw arectangle on the empty space in the right,during the GUI program run, by mouse click.

Drawing mechanism:
When the program is running, the main window GUI willappear. On the Mainwindow GUI, we will firstly clickanywhere in the empty right board, but don’t release it.While keep pressing the click, we drag to any direction to extendthe rectangle. After that, we release it. Then, the rectangle willautomatically be created. The Rectangle creation should beflexible, i.e. user must be able to create it from any of the 4directions, either from top left to bottom right, bottom right totop left, top right to bottom left, or bottom left to top right.The illustration on figure below is the example of creating therectangle from top left to bottom right:

Then, can any one help me how to achieve that in Qt?
Thank you
Best Regards
MainWindow File idea Board About Court ID GroupID MainWindow File Idea Board About Cochat ID Group (draw rectangle here, with mouse click, NOT with code) 0 1. MainWindow File Idea Board About ID GroupID Content Polygon Point 1 rec Point 2 Show transcribed image text MainWindow File idea Board About Court ID GroupID
MainWindow File Idea Board About Cochat ID Group (draw rectangle here, with mouse click, NOT with code)
0 1. MainWindow File Idea Board About ID GroupID Content Polygon Point 1 rec Point 2
Expert Answer
Answer to Hi, I have C++ GUI programming using Qt. Here I have succesfully creating the user interface. Based on the picture above…
OR