This is one of my first real projects that I had to design a GUI for from the ground up. I’ve tried out a lot of different GUI libraries and even had to do some with Java using JavaFX. I really liked the flexibility and versatility that PyQt had so I stuck with it. I had some time to play around with it with another project but I never had to build it with input so this was an entirely new experience to me.

function

  1. Visualizes different sorts
  2. Can generate random array of numbers
  3. Can generate descending array of numbers
  4. Has a speed slider to change how fast/slow the sorting and generating goes

sorts

  1. Bubble
  2. Insertion
  3. Selection
  4. Shell

what i learned

  1. More Python practice.
  2. PyQt5 for GUI.
  3. QtDesigner.
  4. General GUI design ideas.
  5. Better understanding of sorting algorithms.
  6. Some CSS.

resources

notes

I’ve been wanting to make this project for a long time now and tried to dip my feet into the world of GUI building. I first started with Tkinter for python and managed to visualize two sorts. The issue with the way I did was that it didn’t have any user input at all and the sorts would visualize one after the other. It also pre-generated a random array whenever it starts and would just exit once it’s done sorting. I tried a different approach by using PyQt for GUI which allowed me to use QtDesigner in order to design and flesh out the GUI then I just programmed the wanted behavior afterwards. I learned a lot about what goes into building GUIs and things that came with it such as signals from user input. I also learned a little CSS in order to make the progress bars look the way I wanted to.

images

Video on my GitHub

v2

v2

v1

v1