July 2018
Intermediate to advanced
462 pages
12h 2m
English
The major players in this recipe are the mousePressEvent(), mouseReleaseEvent(), and paintEvent() methods. The mousePressEvent() and mouseReleaseEvent() methods are automatically executed whenever the mouse button is clicked or released, respectively. These two methods will be used to access the x and y coordinates where the mouse button is clicked and released. Finally, the paintEvent() method is used to draw a line between the coordinates that were supplied by the mousePressEvent() and mouseReleaseEvent() methods. Here is the step-by-step procedure to create this application:
Read now
Unlock full access