Skip to content

Template for Model View Controller (MVC) using pyqt5

Notifications You must be signed in to change notification settings

abdullahsumbal/mvc_template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Template for Model View Controller (MVC) in Python.

This repository provides a Model View Controller (MVC) design in using PyQt.

model-view-controller-template
│   README.md
│   app.py    
│
└─── model
│   │   model.py
│   
└─── view
│   │   view.py
│   │   main_view.ui
│   │   main_view.py
└─── controller
    │   controller.py

Getting Started

Prerequisites

  1. Install anaconda.
  2. step up python environment
    conda create --name mvc python=3.7
    
  3. activate environment
    conda activate mvc
    or
    source activate mvc
    

Installation

Install required python libraries

pip install -r requirement.txt

Run Application (dev)

Run the following command on terminal

python app.py

The ui is designed using qt designer and saved in main_view.ui in view directory. You can make changes to main_view.ui and convert it to a python file using the following command.

pyuic5 view/main_view.ui -o view/main_view_ui.py

Deploy Application

Run the following command on terminal

pyinstaller --noconsole -n mvc_application  app.py

This will create a dist folder with an mvc_application directory inside.