Code Monkey home page Code Monkey logo

pyqt-gui-template's Introduction

PyQt GUI Template

This template comes with multiple desirable features for setting up a Python Qt-based GUI:

  • GUI / app separation for GUI-less usage
  • One-file executable build script to deliver your GUI
  • File access abstraction to access arbitrary data file in both development use and "One-file executable" delivery
  • Qt error message redirection to console (avoiding a common pitfall when using Qt with Python)
  • A progress bar that keeps the GUI responsive while doing e.g. a long calculation (another common Qt Python issue)

Usage

Start the app with python run.py or as a module: python -m app.

Setup

  • The base GUI only depends on PyQt6: pip install pyqt6
  • To produce a standalone .exe file, also install pyinstaller (pip install pyinstaller) and run tools\make_exe.bat.
  • To interactively edit the GUI, you can use Qt designer: designer.exe app\ui\app.ui. All changes made to ui files have to be converted with the provided tools\ui2py.bat script. To obtain the designer, there are multiple options:
    • Install Qt
    • If you are using conda (recommended anyways), a much easier way is to conda install qt
    • Use pyqt6-tools via pip install pyqt6-tools and run pyqt6-tools designer, although I found it to be less reliable than fully installing Qt, e.g. via conda (see above)

pyqt-gui-template's People

Contributors

chrschorn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.