Question
Hi, I have C++ GUI programming using Qt . Here I have succesfully creating the user interface. Based on the picture above, I am supposed
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 a rectangle 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 will appear. On the Mainwindow GUI, we will firstly click anywhere in the empty right board, but dont release it. While keep pressing the click, we drag to any direction to extend the rectangle. After that, we release it. Then, the rectangle will automatically be created. The Rectangle creation should be flexible, i.e. user must be able to create it from any of the 4 directions, either from top left to bottom right, bottom right to top left, top right to bottom left, or bottom left to top right. The illustration on figure below is the example of creating the rectangle 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 2Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started