Prev Next Table of Contents
See Appendix C, "Answers, for the exercise answers."
4.6.1. Modify the method KTicTacToe::processClicks() so that the user is required to take turns between X and O.
4.6.2. Reimplement KXOSquare::sizeHint() and use this method appropriately in the constructor of KTicTacToe. Compare what happens now when you resize the window to what happened before.
4.6.3. What's the difference between QPen and QBrush? Examine the KDisc code and consult the Qt documentation.
4.6.4. Get to know QPainter. Construct different QPens and QBrushes in KDisc. Draw figures other than a disc.
4.6.5. Try using mousePressEvent() instead of mouseReleaseEvent() in KDisc. Can you tell the difference? Which feels right?