Skip to content

In the spirit of TodoMVC, I used PyQt (Python + Qt) to create a cross-OS desktop todo app. And I used the fman build system (aka fbs) to package the Python runtime and the Qt library binaries into a standalone executable and installer for each of the big three OSes.

Notifications You must be signed in to change notification settings

Jeff-Mott-OR/pyqt-todomvc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A PyQt TodoMVC cross-OS desktop app

In the spirit of TodoMVC, I used PyQt (Python + Qt) to create a cross-OS desktop todo app. And I used the fman build system (aka fbs) to package the Python runtime and the Qt library binaries into a standalone executable and installer for each of the big three OSes.

Mac Ubuntu Windows
Mac installer Ubuntu installer Windows installer
Mac app Ubuntu app Windows app

But why?

For fun and no profit. When I learned C++, at first I put off learning a GUI library. But I was interested in and always meant to learn the Qt GUI library. It lets you write desktop GUIs once that will look native for each of the various OSes. Later, after I did a hobby project in Python, I stumbled upon PyQt -- a project that exposes the Qt C++ library in Python -- and I decided to dive in.

Pre-built executables and installers

Reproducible builds with Vagrant

Build for other OSes by generating a VM from a vagrant configuration file. More.

Windows

$ cd vagrant/windows-10
$ vagrant up

If all goes well, your source directory will contain a Windows setup installer at <pyqt-todo>/target/MyFbsAppSetup.exe.

Ubuntu

$ cd vagrant/ubuntu-jammy
$ vagrant up

If all goes well, your source directory will contain a Debian package installer at <pyqt-todo>/target/MyFbsApp.deb.

MacOS

No VM for MacOS. Boo. You'll need to build for Mac the manual way.

Manual build and run

Get Python3.6. I used pyenv to manage multiple Python versions.

The paid version of fbs works with the latest Python and PyQt, but the free version is limited to older versions. I'm using the free version here, so I have to use Python3.6 instead of Python3.12, and PyQt5 instead of PyQt6.

$ python -m venv venv

This creates a "virtual environment". It's similar to site_modules from npm. It will locally contain any packages you install. More.

$ source venv/bin/activate

Execute shell commands for the virtual environment. It adds stuff to your PATH and whatnot.

$ (venv) pip install -r requirements.txt
$ (venv) fbs run

About

In the spirit of TodoMVC, I used PyQt (Python + Qt) to create a cross-OS desktop todo app. And I used the fman build system (aka fbs) to package the Python runtime and the Qt library binaries into a standalone executable and installer for each of the big three OSes.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages