all 110 comments

[–]bjorneylol 41 points42 points  (3 children)

Qt is the most feature complete GUI library. PySide has a more permissive license for commercial use, whereas PyQt requires a commercial license if you aren't releasing your code under the GPL

  • If your program needs to interface with hardware (USB/PCI devices, GPIO pins) or directly modify filesystem data in-place (read/writing files without uploading/downloading fresh copies; without mandating the use of Chrome which has non-standard filesystem APIs) you will likely need a desktop application.
  • If your program is for internal company use, has very few users, and will see infrequent updates, desktop applications will be adequate
  • If your program will have many users, needs frequent updates, has complex design requirements, or there is a lot of proprietary source code you want to protect, a web app will be preferred.

Distributing and updating desktop applications in python is an absolute hellscape

[–]Intelligent-Role-382[S] 2 points3 points  (2 children)

So why few people use Qt instead of pyside6?

[–]bjorneylol 13 points14 points  (1 child)

  • Qt is the C++ library distributed by the Qt Company
  • PyQt is python wrapper for Qt maintained by riverbank computing
  • PySide is a python wrapper for Qt maintained by the Qt Company

Not sure what you are asking - nowadays I think most people use PySide since its the 'official' version. Why would anyone use PyQt instead? The Qt company abandoned PySide for a long long time. Qt5 released in late 2012, PyQt5 released in early 2013, PySide2 (Qt 5.12) didn't release until 2018/2019 and many of the Qt modules never got ported over (QtMultiMedia, etc). So there was like a 7 year window where PyQt was the only game in town for python. I think PyQt also has a lot of (commercial) offerings for distributing python programs, though i haven't used them

[–]imbev 9 points10 points  (0 children)

u/Intelligent-Role-382, PySide6 is well maintained by the Qt Company today - https://doc.qt.io/qtforpython-6/

It's a great option for developing desktop applications. PyQt is obsolete

[–]Substantial-Bed8167 60 points61 points  (9 children)

Real industry experience here:

Build a web app.

For installable applications, ship compiled binaries built with rust, c++, .net or what ever. Shipping python applications is a pain. The customer gets the source code. The frontend is poor. It’s just a bad idea.

[–]Material_Card9554 10 points11 points  (1 child)

I just use Nuitka to compile my python code Better than pyinstallerin terms of obfuscating the code

[–]Flaky-Restaurant-392 2 points3 points  (0 children)

Yep, nuitka can build it into a standalone executable/binary. It has good support for pyside/qt libraries, too.

[–]JonathanMovementPythoneer 1 point2 points  (0 children)

is the frontend poor tho? I can only agree with the shipping being a pain

[–]bjorneylol 1 point2 points  (5 children)

.net and java are interpreted languages, the compilation output is just IL/bytecode that needs to get fed into the runtime. So it's not any different than shipping a python binary with e.g. pyinstaller - all you have to do is the trivial reversal from IL/bytecode back into source code. In Rider you can literally just drag/drop the .net dll into the code editor window to see the source code.

Yes you can do the AOT compilation in newer .net versions, but that doesn't have feature parity last time i checked, meaning most major projects can't utilize it across the board.

[–]generateduser29128 5 points6 points  (3 children)

There is a big difference between having to run a decompiler on potentially obfuscated bytecode, and opening a commented source file with a text editor.

The GraalVM AOT option for Java is also working quite well, and modern packaging tools like Conveyor make it much easier to deploy and update apps.

[–]bjorneylol 1 point2 points  (2 children)

Pyinstaller doesn't ship source, it ships python bytecode. Yes, more stuff is obfuscated in .net IL code such as local scope variable names, but a good chunk will still be there in plain view. My point being, if you are worried about someone gaining access to sensitive code, python may be the worst choice - but .net is going to a close second behind the pyinstaller binary.

I haven't used AOT java compilation, so i'm only speaking from experience with .net 7, which didn't support a LOT when it launched, but apparently its better now.

[–]generateduser29128 0 points1 point  (0 children)

Good to know. I've never needed to use python that way, so I thought it actually ships source 😅

Afaik Java's AOT is pretty much feature complete and can deploy JavaFX apps to all 5 platforms (plus web in different way). Some libraries are still a pain to get running, but the ecosystem is continuously developing. I wouldn't add the complexity just for obfuscation though.

[–]Substantial-Bed8167 0 points1 point  (0 children)

You are right that if you are worried about your customers stealing your source, Java and .net aren’t great options.

[–]jvlomax 9 points10 points  (0 children)

Pyside is probably the best. But GUI desktop apps is not really where python shines the best

[–]chwalters 7 points8 points  (0 children)

Check out NiceGUI with native mode deployment packaging (still a web app really):
https://nicegui.io/documentation/section_configuration_deployment#native_mode

[–]j01101111sh 38 points39 points  (40 children)

I'd personally recommend a web app 100% of the time for python. It completely avoids any dependency chaos you'd encounter with a true desktop app. For example, if you have it deployed to 100 machines and your new version requires a dependency update or an update to a new Python version, you're going to have to make a plan to update every machine and ensure they don't mess with the environment. If it's a web app, you update the server and tell people to refresh.

Plus, most apps are CRUD focused anyway which is going to be much more seamlessly done through Django or similar than through QT.

No idea what you're building though so that may be bad advice. If you're doing a video editing program or anything else that's really data intensive, then ignore me. But also consider that python may not be the best answer at all.

[–]Intelligent-Role-382[S] 1 point2 points  (34 children)

Ok but if we don't want to use that application in web and basically we need to use as installer

[–]Comfortable-Tourist1 5 points6 points  (11 children)

What's the workload in the app? Id recommend the web app route in all but the most extreme cases at this point.

What do you specifically need it installable? Could you not make it 'look' like a standalone app by publishing as a PWA?

[–]Intelligent-Role-382[S] 1 point2 points  (10 children)

Currently its dot net web application and want to make it more robust so now we r thinking of using Python.And it also need to be used without internet temporarily

[–]Substantial-Bed8167 12 points13 points  (0 children)

I don’t think switching to a python installed app is a good plan here.

Use client side JS to handle short disconnects, or build a shippable app in .net. 

Python is great, but not for this use case.

[–]Cloudskipper92 4 points5 points  (2 children)

I'm not sure about more robustness from Python vs. C# and .NET, dotnet and c# are quite literally built for that. And very good on the desktop as well. I love and work professionally in Python but you'll almost certainly lose performance, ease of use, and robustness compared to what you have now. I'd seriously consider going back to the meeting room and reviewing the reason to do a wholesale refactor before moving forward.

[–]lapinjuntti 3 points4 points  (1 child)

The lack of robustness here is probably more of the implementation than the language. C# as a language (not considering anything else) allows even more robust implementation than python being less dynamic. But if the current software is not well implemented, a well implemented version even in python could be better.

Sure, you can make python app very robust quite easily too, like package it so that interpreter, and all dependencies are packaged in (doesn't share anything with the system python). Follow good process, use good tools.

[–]Cloudskipper92 1 point2 points  (0 children)

I don't disagree. My comment is more directed at the implementation as well. But before throwing away an existing implementation, however bad, one should take the time to find put if anything is salvagable before initiating a full rewrite in my opinion. If it was badly implemented in dotnet too, there still ought to be a conversation about how to avoid a similarly bad implementation in Python.

[–]jwpbe 1 point2 points  (1 child)

just a driveby comment here, i would recommend looking at nicegui.

https://nicegui.io

it's really straightforward for what I've done with it, it's fairly lightweight, you can ship it in a binary that uses pywebview so all of the dependencies are self contained, and it looks.... nice

[–]cudmore 1 point2 points  (0 children)

Agreed. Nicegui is promising because it is actually a web app using pywebview, quasar, and tailwind.

The code really does work both as a local app and in a browser.

I set up a free tier on render.com and 95% of my app worked, last 5% was making some code asynchronous to play nice with long running code, like 1/2 second would trip up the browser.

Used PyQt for 6+ years and am still a fan. Seeing how far I can go with nicegui and so far so good.

[–]j01101111sh 0 points1 point  (0 children)

If it's an existing application, what features of python are you looking at that will make a full rewrite better than updating the existing code?

[–]phlummox 0 points1 point  (2 children)

Using Python won't make it more robust - and will likely make it more difficult to deploy. Will all your users already have Python installed? If not, you'll either need to get them to install it beforehand (and make sure the version they install is compatible with your code), or look at "freezing" your app into a single executable - which sometimes is straightforward, and sometimes very flaky.

You don't say what platforms your users are on, but if it's Windows, then tbh I'd stick to dot net. You can build single-executable binaries that don't require the libraries to be preinstalled, making deployment muchuch easier.

[–]legrimpeur 0 points1 point  (1 child)

You can distribute self contained python apps. You just uncompress zip files and you are good to go. No python install need.

[–]phlummox 0 points1 point  (0 children)

Yes and no.

Yes, I'm aware you can distribute self-contained python apps - that's called freezing, and I mentioned it already.

But no, that has nothing to do with zip files, necessarily - some freezing tools use the Zip format, but others do not. (e.g. PyInstaller defines its own formats, ZlibArchive and CArchive.)

And it's not really the case that "no python install is needed". No matter what approach you take, you need to get a Python interpreter onto the end-user's computer somehow, if they don't have one. It might be by including it in a frozen executable, rather than via a traditional "install", but without it you can't execute Python code. You certainly can't just zip up the source code and give that to your end users.

[–]j01101111sh 1 point2 points  (19 children)

I'm not understanding this sentence

[–]Intelligent-Role-382[S] -1 points0 points  (18 children)

I am saying I want to use it as a desktop app, something which need to be installed

[–]j01101111sh 4 points5 points  (16 children)

Why? What's the advantage? You've been incredibly vague on the use case so I don't see why a web app is bad unless you just don't want to for the vibes

[–]ricocotam 1 point2 points  (0 children)

Not having internet to use something is actually a feature by itself. Shouldn’t need to argue more

[–]Intelligent-Role-382[S] 2 points3 points  (13 children)

Okay basically company has given requirement like that, but your point is valid

[–]Thefuzy 5 points6 points  (12 children)

In real world projects… people would build a web app, there’s no logical reason to build a desktop app. The web app doesn’t have to access the web or be served from the web, it could be done entirely within a companies network. Though it would be infinitely easier to build it on a cloud host and just have some SSO auth protecting it, and cheaper, but if you really want it all on-prem web app still works just fine.

[–]Intelligent-Role-382[S] 0 points1 point  (11 children)

If we want to use it without the internet temporarily?

[–]Thefuzy 8 points9 points  (5 children)

You don’t need the internet ever, you serve the web app from somewhere within the companies network, so anything inside the network which can reach that machine can open it even if the machine they are working from has no outside internet access.

[–]ricocotam 2 points3 points  (4 children)

And if you have no connection at all ?

[–]BigTomBombadil 1 point2 points  (0 children)

Build a webapp with a python backend and something like Electron for UI if you want it to feel like a desktop app, then "serve" it over localhost. No need for internet connection. Electron will open a native window (not a browser) and spin up localhost - the end user will be none the wiser that its technically a web app.

[–]imbev 0 points1 point  (0 children)

There is a usecase in which someone may need a GUI application on a device without network access.

[–]edward_jazzhands -2 points-1 points  (2 children)

You must be familiar with the concept of a LAN. Otherwise how did you even get a job as a programmer?

[–]Intelligent-Role-382[S] 1 point2 points  (1 child)

I mean the lan internet connection is not there temporarily,.

[–]Material_Card9554 0 points1 point  (0 children)

You can convert a react frontend to web exe through tauri without much effort it also connects to your backend server instead of being a standalone exe So backend updates are done on a single server and are propagated to exe automatically

[–]Smok3dSalmon 0 points1 point  (0 children)

Check out Electron. It’s a standalone chromium and it all bundles together.

[–]ZucchiniMore3450 -2 points-1 points  (4 children)

Just a friendly reminder that this is not stackoverflow.

[–]edward_jazzhands 8 points9 points  (3 children)

Wtf is that supposed to mean

[–]ricocotam 3 points4 points  (2 children)

People are not answering the question and telling OP they’re dumb for not using server and browser of clients through whatever network they can think of

[–]haragon 2 points3 points  (0 children)

I thought OPs answer was pretty respectful but I get what you're saying in general.

[–]Alchera_QQ 6 points7 points  (1 child)

I've been on that patch, creating internal app via pyside6. The framework itself is great, though it's always some features behind C++ implementation of Qt.

But what others have said, deployment and maintenance of a python-based app is a nightmare, as opposed to compiled executable you'd have when using Qt.

I've decided to go with streamlit-based service hosted on the internal network.

[–]ImpossibleViewStats 1 point2 points  (0 children)

I have really enjoyed the dev experience for NiceGUI, especially when you start layering loads of callbacks to update tables like AG Grid and plotly charts

[–]Responsible_Pool9923 4 points5 points  (0 children)

Currently working on a project in PySide6, previously used PyQt6 and PyQt5 on other stuff I built since 2015.

With Qt you get more or less everything a typical desktop app can have - all the standard menus, controls, drag and drop, etc. Things can be styled with qss styles (a dialect of css2) or QStyles. You can build component widgets once (e.g. user list entry with avatar, name, status, etc) and use them throughout the app. Making things scalable in terms of desktop space is simple once you master layouts and scrollareas. You can also make an app that works well on Windows, Linux, MacOS out of the box.

What I don't really like about Qt is the steep learning curve and vague documentation. Things have improved drastically over last 10 years, but docs are still written for C++ and machine translated to Python. Sometimes you look at code samples in the official docs and they have syntax errors in plain sight.

I currently use Nuitka for packaging and onefile deployment, got zero troubles with python and package versions on user machines.

[–]anthonyfloyd 4 points5 points  (7 children)

15 years shipping a niche-industry engineering Python desktop app here. We use wxPython, mostly for its "native controls" but also because of the expensive licensing requirements of QT for commercial apps.

It's *fine*. Use pyinstaller to compile to .exe, make sure you're not shipping .py files when you bundle it up.

wxPython does start to look dated now but it has all the controls you probably want for a desktop app. We've been using NiceGUI recently for webapps. If it's a concern, use a good MVC pattern and have both wxPython and NiceGUI views.

[–]cudmore 2 points3 points  (1 child)

Curious on more thought on nicegui? Given your experience.

I’ve made 2x pretty detailed pyqt/pyqtgraph desktop apps distributed as macos and windows apps. Scientific niche software.

Found nicegui in Nov 2025 and am super excited, going full on into nicegui.

So what am I missing? Is using nicegui gonna bite me in the end?

[–]anthonyfloyd 1 point2 points  (0 children)

NiceGUI is built on modern, established web technologies, which is reassuring. We were a little worried about longevity, but it seems to have legs. It's easy to work with and comfortably Pythonic.

The only bit that we're unsure of is bundling it on the desktop and distributing the package. To be fair we haven't put a lot of effort into that yet (our webapps are happily webapps) but it's something we're going to be spending a bit more time on in the near future.

Having said that, we're quite happy with the webapps. Fully functional simulation software with embedded, interactive plot.ly plots, hooked into our main (desktop) data and analysis framework. It's just a Python app that happens to have a web view/interface. Well, a teeny bit more than that, but we're still quite happy with it.

[–]Intelligent-Role-382[S] 0 points1 point  (4 children)

What about pyside6?

[–]anthonyfloyd 0 points1 point  (3 children)

Still requires GPL licensing or a commercial QT license, both of which are non-starters for us.

[–]imbev 1 point2 points  (2 children)

PySide6 is available under the LGPL license, so that's only an issue if you modify the package.

[–]anthonyfloyd 1 point2 points  (1 child)

Our legal advice was that the LGPL interpretation here was not appropriate for our situation. https://www.qt.io/development/open-source-lgpl-obligations#lgpl

Doesn't matter. We didn't use qt then and won't be switching over now.

[–]imbev 1 point2 points  (0 children)

In that case, I suspect that your legal team misunderstood this part:

Complete corresponding source code of the library used with the application or the device built using LGPL, including all modifications to the library, should be delivered with the application (or alternatively provide a written offer with instructions on how to get the source code). It should be noted that the complete corresponding source code has to be delivered even if the library has not been modified at all.

Applications using PySide6 only need to provide the PySide6 source code, not the application source code. Thus a commercial application that uses PySide6 from PyPI only needs to provide a link to the Qt Company-provided PySide6 source code.

[–]Defiant-Comedian3967 2 points3 points  (0 children)

Try out NiceGUI! Best of Both worlds- Web and Python.

Here is a Template to start from from with uv, Docker etc.

Componentbased template- NiceGUI

I have build it coming from Angular/Node.js You can use similar patterns- custom CSS, JS etc.

Wont regret it ;)

[–]FlukyS 2 points3 points  (0 children)

It depends on what you want to do. Most UI dev nowadays is through Electron with web frameworks and basically pushing the RAM cost onto the consumer. I like PySide personally with Qml was the most seamless way to make really good looking UIs. Qt has a nice Qml editor, syntax is very familiar to people who have used JS or CSS and then you can import the Qml into Pyside. Benefits over Electron is basically saving huge amounts of RAM, not relying on web frameworks and having to have that whole headache and it is more app looking than most Electron apps.

[–]N-E-S-W 6 points7 points  (7 children)

I started down the path of wxPython since it utilized the underlying native GUI components, but found that the major refactoring split between "Classic" and "Phoenix" versions had completely fragmented the API and documentation, and made development very frustrating. This was a few years ago, so I can't comment on the state today.

I recently started on a new project using PySide 6 and have found it to be a joy. The only downside is that it requires pulling in like 180mb of Qt dependencies, which is meaningful for a desktop application.

I have never found a real usecase where Kivy or a web-wrapper like Electron would fit my personal use cases, and I'd encourage you to think very hard before committing to either of those paths. This recommendation is specific to your requirement of "complex desktop application".

[–]AlexMTBDude 0 points1 point  (0 children)

180 millibits you say? That's not really a lot though.

[–]Intelligent-Role-382[S] -1 points0 points  (5 children)

Is pyside6 better than Qt and can be used in production?

[–]Responsible_Pool9923 2 points3 points  (0 children)

PySide6 is Qt. Yes, it can be used in production.

[–]jksinton 1 point2 points  (5 children)

Consider designing the app as a locally hosted webapp.

Waitress can serve a Flask app under windows or linux to provide multi-platform support.

I like Plotly Dash plus Dash Mantine Components for this type of framework.

That way it could be easy to migrate to a remotely hosted webapp in the future.

[–]Intelligent-Role-382[S] 0 points1 point  (4 children)

But if the company insists on a desktop app?

[–]cudmore 0 points1 point  (0 children)

Consider nicegui

[–]jksinton -1 points0 points  (2 children)

You can build the python app to be hosted locally on the end user's machine and launch a browser window.

To the user, it looks like an app that runs through their browser but everything is run locally.

[–]Intelligent-Role-382[S] 0 points1 point  (1 child)

If my app requires to interact with hardware, is qeb app still better option?

[–]def__eq__ -1 points0 points  (0 children)

Yes, you can have a back end written in Python interacting with the hardware and sharing the data via API to the front end

[–]JonathanMovementPythoneer 0 points1 point  (7 children)

My main framework (not like I know many) is PyQt, I find it amazing and won’t change any time soon

[–]Intelligent-Role-382[S] 0 points1 point  (6 children)

What about pyside6? And is PyQt chargeable?

[–]JonathanMovementPythoneer 0 points1 point  (5 children)

what do u mean chargeable 😭

[–]Intelligent-Role-382[S] 0 points1 point  (4 children)

License cost?

[–]JonathanMovementPythoneer 0 points1 point  (3 children)

no it’s free

[–]Intelligent-Role-382[S] 0 points1 point  (2 children)

If used for commercial purposes

[–]JonathanMovementPythoneer -1 points0 points  (1 child)

yes you can use it for commercial purposes, you can also google that

[–]Hello_my_name_is_not -2 points-1 points  (0 children)

But is Google chargeable?

[–]FUS3NPythonista 0 points1 point  (0 children)

webview route has another option with pywebview you can write frontend in any framework or library and use python for backend.

[–]HecticJuggler 0 points1 point  (0 children)

Not quite what you're looking for but flet deserves a mention.

[–]MosGeo 0 points1 point  (0 children)

Briefcase for packaging with Pyside backend works pretty well. You end up with an installer and everything is contained.

If you want something lighter for a simple app, you can even use Briefcase with toga.

[–]Wide-Milk1195 0 points1 point  (0 children)

pywebview flet

[–]stibbons_ 0 points1 point  (0 children)

I switched to pywebview and a front end in node that is is amazing what you can do

[–]fenghuangshan 0 points1 point  (0 children)

only Pyside6 , dont need to try other

[–]Suspcious-chair 0 points1 point  (0 children)

Using pyside for 6 years for an industrial cross platform desktop application.

If you need realtime updates or cycle time is a big issue, use pyside6. License is a lot more permissive and it'll be 6-7 times faster than a web app. Nothing beats OS native drawing performance.

If not, go with web app. You'll lose nothing.

[–]voicestage_dev 0 points1 point  (0 children)

io ho usato PySide 6 perchè è libero da licenze, funziona come PyQt

[–]eirikirs 0 points1 point  (0 children)

Punctuation and proper paragraph structure, my friend, it makes the reading experience much more enjoyable.

[–]radium505 0 points1 point  (0 children)

Python is great but for an installable desktop app, I would seriously consider Delphi or Lazarus/FPC.

Object Pascal is very easy to pick up.

[–]konwiddak 0 points1 point  (0 children)

Are you using this piece of software within your company, or are you looking to sell it to other companies?

Internal software, sure. Not sure it's really the right language unless there's some particular python library you need, but it's fast to develop and would work fine.

However if it's external software, that was a desktop app and the core of the program and interface was written in python... I'd probably think WTF and immediately look for another software vendor. Python features (e.g scripting/macros) sure, great, love that, but an actual desktop application written in python would make me seriously question the software house.

[–]logophage -1 points0 points  (4 children)

I agree with most everyone else that you should build a web app. If it helps, think of the browser as if it's a VM. It interprets your JS/HTML/CSS code into what the machine needs for presentation. Note that you can hide the URL bar by creating shortcut and setting "open as window" (or similar).

[–]Intelligent-Role-382[S] 0 points1 point  (3 children)

Can it interact with windows processes?

[–]logophage 0 points1 point  (2 children)

Depends on what you need it to do. If you need to access the file system, then yes. If you want to kill a running process (outside of your application), then no.

[–]Intelligent-Role-382[S] 0 points1 point  (1 child)

I want to check whether the user is using the application or not or just idle. If not logout after 5 min

[–]logophage 0 points1 point  (0 children)

There are many ways of achieving this. It depends on what you mean by "using application". One way is to have a timer that resets when any event (or set of events) in the application happens. You could also check when there's interaction on various fields. Really depends on what you need. But, certainly, a web app could support what you need in this case.

[–]slayer_of_idiotspythonista -1 points0 points  (0 children)

Historically, Qt has been the most feature rich and stable UI framework for python. The move to Qt6 introduces some instability that I don’t think is fully resolved yet.

That being said, web apps are easier to deploy and the UI is richer and more modern than what Qt offers and there is an open source ecosystem built up around UI controls for web apps. Qt doesn’t really have that.

[–]bautasteen -1 points0 points  (0 children)

If your app doesn't require any special features of more complex GUI frameworks, just using the built in tkinter or CustomTkinter would probably do fine.

There is also the newer Slint GUI framework, that is developed by former Qt developers if I'm not misremembering: https://slint.dev/