6 ms·
I used (and liked) wx in the nineties - didn't know it was still around. Qt is my goto GUI for Python these days, does anyone have experience with wx vs Qt for
by zwieback 9y ago
I used (and liked) wx in the nineties - didn't know it was still around.
Qt is my goto GUI for Python these days, does anyone have experience with wx vs Qt for Python? The samples look like it's all dynamically generated (vs. something like QtDesigner) and that's how we used it way back when.
- cabalamat 9y agoMy "go to GUI" is a web app -- I can't imagine anything I'd write a GUI app for these days.
- IgorPartola 9y agoText editor, video, audio editor, system widgets and settings, web browser, terminal emulator, git GUI client, crypto coin wallet, chat client, games, document editor, security focused software a la Keybase client.
- tempay 9y ago> I'd write a GUI app for It's unlikely that cabalamat would attempt making most of those and the others could definitely be done as a web/electron app if desired.
- JustSomeNobody 9y ago> ... and the others could definitely be done as a web/electron app if desired. But probably shouldn't because we don't produce enough renewable energy yet. There's still something to be said about using TRUE native apps.
- cabalamat 9y agoI agree that electron is a bloated resource hog. But if you're running a web browser anyway (I always am) then it's not a big deal to have a web app with the server running locally and the client being a browser tab.
- IgorPartola 9y agoWell sure. That is to say that Qt/Wx/GTK/etc. are as useless to cabalamat as to a Ukrainian plumber. In other words, that isn't saying much. If you don't write desktop apps, you wouldn't use a desktop app GUI toolkit, but that's a tautology. But cabalamat's comment implied that all desktop GUI toolkits are now useless because we have the web, which is a fallacy of generalizing personal experience to everyone else.
- cabalamat 9y ago> But cabalamat's comment implied that all desktop GUI toolkits are now useless because we have the web, which is a fallacy of generalizing personal experience to everyone else. Not useless in general, just useless for me I once wrote a Python program to compile GUIs[1] -- you input a description of the GUI as a text file and it outputs Python code that implements the GUI in Tkinter. I dusted this off for a project last year but eventually decided that making it web-based would be easier to write, look nicer, and have more functionality. Obviously if other people find WxPython useful, good luck to them. 1: see https://github.com/cabalamat/parrot https://github.com/cabalamat/parrot
- cabalamat 9y ago> It's unlikely that cabalamat would attempt making most of those and the others could definitely be done as a web/electron app if desired. I'd write a web app and expose it on 127.0.0.1:someport rather than electron (which is bloated). Going down IgorPartola's list: Text editor - I'd probably make this terminal-based using curses. Then I could easily use it on a remote server I'm ssh'd into. video, audio editor - I've no plans/desires to write anything like these system widgets and settings - a web app is highly suitable for editing system settings web browser - far too big a project for me! terminal emulator - plenty of good ones around already. I mostly use KDE's konsole. git GUI client - I've recently been adding some git functionality to my catwiki wiki software (a web app) https://github.com/cabalamat/catwiki https://github.com/cabalamat/catwiki crypto coin wallet - web app chat client - web app or terminal-based games - I've considered writing a hex-based board wargame as a web app document editor - my catwiki wiki software is this, I suppose security focused software a la Keybase client - the last time I wrote security software was a zero-user-interface email encryption system. If I did something like that in future, any interface would be web based
- sfifs 9y agothe point is HTML5/CSS/JS nowadays provides superior UI experience to traditional UI frameworks. In many of the categories above, there are electron/webview based applications that's very popular. Text editor, document editor -> VS Code/Atom terminal emulator -> Google's terminal emulator git GUI client -> GitHub client is electron based chat client -> slack is electron based games -> lots of web based
- seanmcdirmid 9y agoThe only thing superior about HTML/CSS/JS GUI are its ease of deployment and portability characteristics. As a UI platform, it feels like a huge step back from modern desktop GUI APIs, like we are doing UI programming in the 90s again.
- sfifs 9y agoAnd I feel the other way around. "Modern Desktop GUI" feels clunky and archaic to me :-) Like menus and toolbars and the "ribbon" ajd the status bar and those clunky desktop widgets...
- seanmcdirmid 9y agoThat is a UI design issue: you don’t gave to use those, and if you do, it’s up to you to use them right. Web comes with a lot of limitations, many of those widgets obviously don’t make sense in the browser; heck they probably don’t make sense on the desktop but that is less obvious. With web, simplicity is enforced out of nescessary limitation, and this has turned out to be good for users. From a programming perspective, modern desktop UI libraries are much more powerful and have less limitations. How you use that power is up to you and your UXD, however.
- coldtea 9y agoIt's because you have been conditioned to have low expectations by web apps.
- 9y ago
- rburhum 9y agohow about the very browser you are using to read this?
- zwieback 9y agoI'm in my 50s but not trying to be stuck in my ways so this year my development goal is to learn web app development. Interestingly, I will learn it from my mentee, who's been doing a great job using browser-based GUIs for a fleet of test and production machinery. Guess I'm the mentee now...
- mmargerum 9y ago49 here. Old c / c++ salt. Self taught go, js, and vue. I love it. Always fun to learn new approaches . After build reactive uis it will be hard to go back to building them the traditional way
- fencepost 9y agoIt's been a long time since I looked at wxpython, but does it still have a wxWebKit or similar that you could use to wrap your web app into a local compiled executable? Edit: at a computer, this would be wx.html2, but it's a wrapper for the native platform's browser components so would vary from system to system.
- sireat 9y agoHow do you keep sane in web-app development? Rather what is the normal workflow for making UI in web-apps? How do you keep the abstractions from leaking over? It seems you need to keep all the CSS quirks in your head to be productive. As a counterpoint in something like WPF, I do not need to know much or anything about XAML to produce a usable UI quickly that will not break in bizarre ways. Same goes for PyQT, a few hours starting from scratch(ie not knowing anything about PyQT) and you can make something usable. WxPython same thing, classes in a control such as wx.dataview look normal enough.
- cabalamat 9y ago> It seems you need to keep all the CSS quirks in your head to be productive. Bootstrap does away with a lot of them.
- mrastro 9y agoI haven't used wx but at least one of the advantages is when exporting a project to .exe I assume you don't need to include the Qt libraries (i.e. .dll files) separately to conform with their licence, it can (legally) be in a single executable.
- vog 9y agoYes, that's an issue, but only if you don't want to make your Qt client Free Software. Since nowadays most client-side applications are tied to some web service anyway, releasing those as Free Software might even be advantageous. Having said that, statically linked wxWidgets .exe files are usually smaller than Qt .exe files. Moreover, dynamically linking to Qt does have technical advantages for certain types of applications (mostly plugin architectures). Shameless plug: You can create all variants (Qt or wxWidget, each statically or dynamically linked) very conveniently on your Linux build server via cross-compiling, which has become really easy thanks to the MXE project that I started in 2007. http://mxe.cc http://mxe.cc
- Kliment 9y agoThanks so much for MXE, it made cross-platform application development much less painful for me.
- ihnorton 9y agoThe LGPL requirement is relinkability, which implies either distributing object files for your application (rare, inconvenient), or, more commonly, linking the LGPL library as a shared object. But that shared object could be stripped down to contain only the symbols your app uses (and their transitive dependants) — just as long as someone can do the same and use their API-matched .so as a drop-in replacement.
- jstimpfle 9y agoI tried Qt (in C++) and even though it's developing (QML brings "modern" mobile widgets) it felt like they are stuck in the nineties. Heavily object-oriented code and custom scripting languages that are really hard to understand and use, and when there were problems (memory leaks, reference counting) I was stuck 15 (Qt) calls deep somewhere in the huge codebase. Thanks, but I'm now doing it myself and learning the right abstractions (and sane software architecture in general), instead of spending my time learning the incantations to make this elephant move the way I need him to.
- zwieback 9y agoI've only done Qt toy apps on the Pi with C++, which was a pretty good experience, could imagine a large Qt codebase in C++ could be stressful. For Python I like Qt quite a bit because the loose signal/slot approach meshes nicely with a dynamic language.
- sevensor 9y agoI work on a sizeable desktop application written in PyQt. While I agree that Qt has a very nineties feel about it, you don't have to buy into that. Specifically, you don't have to use class hierarchies to model your domain. It actually helps to have a language boundary -- we can let Qt be its object-oriented self, but on the Python side it's different. We do a limited amount of subclassing, which lets us hook into user interaction events, but other than that we use whatever works best in Python. As time passes, this seems to involve more and more straight-forward procedural code, less and less object-oriented modeling.
- zwieback 9y agoMy experience as well - a lot of my nuts and bolts OO work in static languages was making things conform to interfaces and existing class hierarchies. In dynamic languages there's less need for that and hierarchies are shallower and less entangled. None of that is surprising, of course.
- fps_doug 9y ago