Thursday 21 January 2016

Polygon(Triangle,Rectangle and Square) Drawing in C++

Q: Write a C++ class to draw the following polygons
  • Triangle
  • Rectangle
  • Square

 

 Code

Framework used:- QT( Cross Platform)
Os:- Windows/Linux(faces no problems on Windows)

Program 1:

Uses Radio buttons and draws when user clicks on the draw button.



Program 2:

Uses mouse click event. Right click to change the shape. Left click to draw side by side.


Download Links

Contain the following:-
  • Linux executables(created using QT version 4.8.4)
  • Source & Header files
  • Screenshot
For Program1(With radio button):- Program1
For Program2(With mouse events):- Program2

No comments:

Post a Comment