Skip to main content

Projectmaker

Custom Analog Gauge

Project Builder/Project Setup Wizard

Features

This is a simple wizard that will help you create your pyside/pyqt project quickly by building the most common files for you. This wizard will:

  • Create icons for you(any color you want)
  • Create the resource file(QRC, Py-Qrc not needed anymore by the Custom Widgets)
  • Create the main file
  • Create the json stylesheet file. JSon stylesheet file will be used the create the app settings and pass other values to the custom widgets module such as the app name.

Custom Analog Gauge

Getting Started

  • Install the custom widgets module.
pip install QT-PyQt-PySide-Custom-Widgets
  • Create an empty project folder
  • Open the command line inside this folder(Make sure the folder is empty)

For custom widgets version 0.6.9 +

  • From your command line/Terminal, type
Custom_Widgets --create-project

For custom widgets version < 0.6.9

  • From your command line/Terminal, type python press enter
  • Now type from Custom_Widgets import ProjectMaker press enter
  • Now the wizard will take you through the required steps to build your project

Then:

  • Once youre done, enter Y or yes to run the built project
  • To exit the wizard, enter N or no

Now you can open and edit your project!!

Custom Widgets project structure

The created project will have the structure below:

project_name/

├── README.md
├── requirements.txt
├── main.py

├── ui/
│ ├── main_window.ui
│ └── ...

├── src/
│ ├── __init__.py
│ ├── utils.py
│ ├── helper_functions.py
│ └── ui_main_window.py # Automatically generated from main_window.ui

├── qss/
│ ├── scss/
│ │ ├── style.scss
│ │ └── ...
│ │
│ └── icons/
│ ├── icon1.png
│ └── ...

├── logs/
│ └── custom_widgets.log

├── json_styles/
│ ├── style.json
│ └── ...

└── generated-files/
├── new_files # Automatically generated by Custom Widgets
└── ...


Description:

  • README.md: Description of the project.
  • requirements.txt: List of Python dependencies required for the project.
  • main.py: Entry point of the application.
  • ui/: Directory containing UI-related files.
    • main_window.ui: Main window layout file.
    • Other UI-related files.
  • src/: Source code directory.
    • __init__.py: Package initialization file.
    • utils.py: Utility functions.
    • helper_functions.py: Additional helper functions.
    • ui_main_window.py: Automatically generated Python code from main_window.ui.
  • qss/: Directory for Qt Style Sheets (QSS) and icons.
    • scss/: SCSS files for styling.
    • icons/: Icon images.
  • logs/: Directory for log files.
    • custom_widgets.log: Log file.
  • json_styles/: Directory for JSON style files.
  • style.json: Example JSON style file.
  • generated-files/: Directory for files auto-generated by the custom widgets module.
    • Example generated files include UI's and JSon files

Theme engine and UI files converter.

The above structure allows for automatic app theming and conversion of UI files to Python code and placement within the src folder, simplifying the development process for users.

The Custom Widgets theme engine:

  • Applies new icons on theme change without need to restart your app.
  • Faster theme/icons switching.
  • The custom widgets module comes with its own icon sets:
    • Feather
    • FontAwesome
    • and Google material design icons.

During your GUI/UI designing using Qt designer when convertng UIs to Py you must use the Custom Widgets UI converter which will generate the neccessary files required. UI converter can also monitor changes to the UI folder and automatically convert the changed/updated file.

Learn more about the theme engine and UI converter before proceeding.

What Next?

Its time to improve your UI design skills with QT, watch these tutorials