Skip to content

Latest commit

 

History

History
93 lines (62 loc) · 4.1 KB

README.md

File metadata and controls

93 lines (62 loc) · 4.1 KB

Python GUIs Examples

This repository contains 100s of GUI examples written in Python. From complete working applications to reusable widgets snippets, these examples can be freely re-used, re-mixed and tweaked to build your own Python GUI applications.

Examples are available for PyQt6, PySide6, PySide2 and PyQt5

Many of these examples have more detailed write-ups on the Python GUIs website. If you're new to creating GUI apps check out the introductory PyQt6 tutorial or PySide6 tutorial.

The demo apps

The apps showcase various parts of the Qt framework, including advanced widgets, multimedia, graphics views and decorationless windows. However, the most generally interesting/feature complete applications are Minesweeper, Solitaire and Paint.

  1. Web Browser (untabbed) - "MooseAche"
  2. Web Browser (tabbed) - "Mozzarella Ashbadger"
  3. Minesweeper - "Moonsweeper"
  4. Notepad - "No2Pads"
  5. Calculator - "Calculon" (QtDesigner)
  6. Word Processor - "Megasolid Idiom"
  7. Webcam/Snapshot - "NSAViewer"
  8. Media Player - "Failamp"
  9. Post-it Notes - "Brown Note" (QtDesigner)
  10. Paint - "Piecasso" (QtDesigner)
  11. Unzip - "7Pez" (QtDesigner)
  12. Translator - "Translataarrr" (QtDesigner)
  13. Weather - "Raindar" (QtDesigner)
  14. Currency converter - "Doughnut" (PyQtGraph)
  15. Solitaire - "Ronery" (QGraphicsScene)

The widgets

Graphical Equalizer Graphical Equalizer Visualize audio frequency changes with configurable styles and decay.

Power Meter Power Bar Rotary control with amplitude display.

Palette Palette Select colors from a configurable linear or grid palette.

Gradient Editor Linear Gradient Editor Design custom linear gradients with multiple stops and colors.

Color Button Simple button that displays and selects colors.

Paint Draw pictures with a custom bitmap canvas, with color and pen control.

Password Edit A password line editor with toggleable visibility action.

Toggle Widget Replace checkboxes with this handy toggle widget, with custom colors and optional animations.

The tutorials

As well as the complete apps & re-usable widgets we've got selection of code snippets taken from tutorials on the Python GUIs website. These guide you through building GUIs with PyQt, PySide and other libraries.

Getting started

To use each app you first need to install the requirements. In most cases the only requirements are the GUI library and occasionally requests. To install example specific requirements change to the folder of the example and run:

pip3 install -r requirements.txt

Once the requirements are installed, you can run the app. Every example in this repo comes with a main Python file called main.py to keep things simple.

python3 main.py

The application window should appear.

Want to build your own apps?

If you think these apps are neat and want to learn more about take a look at my PyQt6 tutorial which covers everything you need to know to start building your own applications with Python.

You can also find more write-ups and tips on the same site.

License

All code is licensed under an MIT license. This allows you to re-use the code freely, remixed in both commercial and non-commercial projects. The only requirement is to include the same license when distributing.

Other licenses

Icons used in the applications are by Yusuke Kamiyaman.