Today we will learn how to design systems that respond to internal and external events in an application.
Links:
GitHub Invitation URL: exercise12
Steps:
Clone the assignment for today after accepting the GitHub invitation at the link above.
Define and implement a class WidgetEvent
that publicly inherits from QWidget
. Override the event member function, printing the event type and returning true.
Write a main function in main.cpp
that uses QApplication
to instantiate the WidgetEvent class, show it, then enter the event loop.
Build and run your application using the provided CMakeLists.txt and your compiler. Examine all the different events the widget recieves by default.
Now, insert a blocking call to standard input in the event member function. Rebuild and run the application. What happens?
Now, use git to commit the source files to the local repository.
Finally, use git push to synchronize the repository with that on GitHub.
You have completed the Exercise.