Final Summary

The field

In this tutorial series you have created a user interface for a field simulation. You have seen how to:

  • Create labels that display images rather than text
  • Create sub-classes of QGraphicsScene containing background images
  • Add toolbars to the main window
  • Add labels to toolbars
  • Use event handling to add drag and drop functionality between the toolbar labels and the field
  • Add context menus to graphics items
  • Create custom dialog classes than can contain dynamic content
  • Use wrapper methods to access functionality in some classes

We have still barely scratched the surface of what is possible in PyQt but this tutorial has been a good introduction to some of the more advanced features, such as event handling. You now have some familiarity with the following PyQt widgets:

Spend sometime reading over the class documentation for each widget to become more familiar with its attributes and methods. Remember that a particular class may inherit attributes and methods from a parent class - always look out for that!

Final thoughts

Through this series of tutorials you have discovered how to create user interfaces in Python using the PyQt framework. You now have the knowledge and experience to tackle A-Level projects.

However, this is not the end of the journey - to ensure that the skills you have developed don't fade you should start developing your own applications that build and extend what you have learned. Only then will you become comfortable with what has been introduced here. A good starting point would be to develop this simulation further - into a fully working farm.

Remember to keep the PyQt class reference close and refer to it often.

Have fun!