Branching Out On Your Own

thetree

If you’ve completed all of the tutorial examples in the Zetcode PyQt4 tutorial, you should be ready to try your own PyQt4 programs.  Let’s start by adapting one of the examples you tried in the tutorial. (You’ll need to figure out which one I’m referring to.)

Write a program that displays a window with the title “Branching Out”  The window should include two buttons.  One button should be labeled “UP” and the other one should be labeled “DOWN“.  When the “UP” button is pressed, the phrase “You’re up to no good.” should be displayed in the status bar.  When the “DOWN” button is pressed, the phrase “Let’s get down to business.” should be displayed in the status bar.

up-down-win

Once you locate the example that needs to be modified, keep in mind that you’ll have to add a decision block (“if”) to determine which button was pressed.

Name your Python file qt-updown.py.  Submit your completed work using this submission link.