5 ms·
FWIW I use PyQt5 in a code editor project I maintain. While all GUI frameworks have hiccups and smells to various degrees, Qt and PyQt5 has been, relatively spe
by ntoll 8y ago
FWIW I use PyQt5 in a code editor project I maintain. While all GUI frameworks have hiccups and smells to various degrees, Qt and PyQt5 has been, relatively speaking, the strongest UI framework I've encountered for Python. Why? Ease of development, cross-platform reach, "batteries included" (e.g. accessibility features, important for my project), friendliness of the API and breadth of features immediately spring to mind.
Perhaps PySide's return will encourage some competition in the Qt space for Python. For example, I wish it was simple to create a cross-platform installer for stand-alone Python apps that use Qt. Current solutions suffer from the 80/20 rule where the 20 usually contains something essential.
- mherrmann 8y agoSorry to be spamming here but check out my https://github.com/mherrmann/fbs https://github.com/mherrmann/fbs. It is literally the solution to your pain point.
- StavrosK 8y agoMan, when a project is this useful, spam away. Thanks for this.
- ntoll 8y agoAha... thanks for the heads-up. :-)
- fernly 8y agoNo, interesting and useful. But a few questions. So basically you have automated the job of calling PyInstaller to make a standalone app, plus the step of wrapping the app in an installer. Yes? In order to use this, if I read the tutorial[1] code correctly, I must modify my app to wrap everything -- or at any rate, all PyQt-related things? -- inside an AppContext, and modify the outermost level to create this. If so, this is easy enough for the tutorial but what if my app opens multiple windows and has code to create them spread over multiple modules (as one of mine does). Is there a simple way to get all these bits into one "context"? Or have I read too hastily? [1] https://github.com/mherrmann/fbs-tutorial https://github.com/mherrmann/fbs-tutorial
- mherrmann 8y agoIt's more than just automating the calling of PyInstaller. It also fixes some edge cases with PyInstaller-built apps that lead to crashes on some users' systems and took me months to figure out. Further, it integrates the solutions nicely. You don't have to learn how PyInstaller works, fbs does it for you with very reasonable default settings. You don't have to figure out how you are going to ship resource files and access them from within your app, etc. Yes you should use the AppContext. You don't have to convert your entire app to it. Only enough to "start" your app. (I highly recommend the app context approach where possible however, it's just so clear.)
- daenz 8y agoDoes it use Qt IFW? That's what I've been using for cross-platform installers.
- makmanalp 8y agoHas the python qt installation story improved much recently? A few years ago it was a pain to set up, especially within a virtualenv, which was one of my only complaints with it. Everything else was wonderful.
- mherrmann 8y agoYou can just do `pip install PyQt5` now. That is possible without a virtual environment, but in practice I think you still want to use one: python3 -m venv venv && source venv/bin/activate && pip install PyQt5.
- simonh 8y agoHow well does that work on OSX? I’ve tried many times over many years, but never got a satisfactory working Python + Qt development environment working on the Mac.
- RayDonnelly 8y agoconda install pyqt
- RayDonnelly 8y agoWhy was this downvoted? It will setup exactly what was asked for. Specifically qt 5.9.5 with PyQt.
- mkl 8y ago>>> You can just do `pip install PyQt5` now. >> How well does that work on OSX? > conda install pyqt Your comment, while presenting a potential solution to the original problem, did not make sense in context and went off in another direction entirely.
- RayDonnelly 8y ago
- bbernoulli 8y agoI'll echo this. I've maintained a production PyQt based app for 7-8 years (started on PyQt4/py2, moved to PyQt5/py3, but I evaluated PySide as well). It involved wrapping another Qt library for use from python. I found the bindings I created based on SIP (which is what PyQt is based on, both written by the same author) to be overall easier to create and smaller in size. It's great that we're getting Qt backed bindings but Phil Thompson has done a wonderful job with PyQt over the years and I really would've liked to see it become the official library somehow.