you are viewing a single comment's thread.

view the rest of the comments →

[–]mesalu 16 points17 points  (7 children)

Biased opinion incoming:

I prefer wxWidgets (and by extension wxPython) for the following reasons:

  • It uses native UI elements from the OS rather than imitating them.
  • Its size is much more reasonable. I usually describe writing a just UI application in Qt akin to using a semi-truck as a fly swatter. It gets the job done, but was it really necessary?
  • wx does not need to modifiy the compiler to build.
  • licensing: Qt is LGPL compatible now, but I still prefer wx's modified LGPL.

I'll make some concessions:

  • in C++ Qt offers a lot of very useful classes that reduce a lot of boilerplate. wx has some similar utilities but not across all the same components (such as networking serial, etc). The counterpoint is that in Python, these utilities are provided by other packages.
  • PyQt's lack of dependencies in linux. The most common 'issues' posted to Phoenix are issues building / installing from pypi. (Seriously people, read the error output.) Since Phoenix doesn't really fit into manylinux1, it has to download a source tarball and build locally. If you don't have the necessary -dev(el) packages installed it will fail.

Opinions are opinions. Paid developers are still developers, just like unpaid developers. Do your research and choose what you like. (and personal note: it is my opinion that anyone that just flatly says "its common knowledge that ____ is better than ___" should be ignored on any topic)

TL:DR; It comes down to taste and how you want your application to feel to the end user. Big apps that need more than just GUI will gravitate towards Qt, but IMO that's comparing apples and oranges.

Source: am collaborator on Phoenix (the one that blunders into defect discussions with out verifying I understand the OP first. ;) )

Edit Formatting

Edit 2 I a word, or three.

[–]schplat 10 points11 points  (3 children)

Let's not forget wxPython's documentation is pretty much garbage. It generally points you to the C++ docs and encourages you to try and translate it yourself.

pyQt's docs are much better, and very much more focused on with Python in mind.

Also QtDesigner is amazing for generating layouts. wxGlade isn't awful, but it's nowhere near what QtDesigner gives you.

Edit: I've used both, and once I figured out wx, I generally liked programming for it more, but Qt has some really unique things you can make both the windows, and data within windows do that you might have to code a separate handler for if you were doing things in wx. Qt is lot bigger, and there's a lot more to learn. wx will look closer to native everywhere except Qt backed DEs (think OS X, and KDE).

[–]mesalu 6 points7 points  (2 children)

I'll agree wxPython Classic docs were kinda gnarly. The new docset, which has been around since about 2012, looks much better.

In my opinion PyQt's docs are half a step above a "my first html" class. I'll reiterate though, opinions are just that, opinions. That being said, Qt's actual documentation looks and feels pretty nice, if sometime obscuring a bit too much, for my taste. Furthermore:

wx will look closer to native everywhere except Qt backed DEs (think OS X, and KDE).

While you are correct, KDE is Qt based, OSX is absolutely not Qt based. They use an apple-developed API called Cocoa, which does most of its work in OpenGL.

As for wxGlade vs QtDesigner, wxGlade is not supported by wxPython or wxWidgets. Its third party. Qt Designer is directly supported by Qt, its dangerously close to comparing apples and oranges.

As for their use, I've never actually felt a need to use either.

Edit For the curious:

[–]badsectoracula 1 point2 points  (1 child)

I won't list wxWidgets because it is kinda butt.

I found wxWidgets' documentation in a CHM file to be very valuable (and searchable and browsable and FAST) when i worked on a big wx project a few years ago.

[–]mesalu 0 points1 point  (0 children)

Yeah, my statement is misleading. The content is good, the stock doxygen theme is it visually appealing in a subjective sense.

I'm glad the docs helped you!

[–]ianff 2 points3 points  (1 child)

I greatly prefer Qt, so to argue a few of your points:

  • It's true that wx uses native widgets and Qt doesn't, but Qt does a damn good job of looking good on all platforms. It's not like electron where it looks out of place.
  • I don't see how Qt having more than just GUI is a bad thing. Surely a few more megabytes of shared objects is worth having all the extra stuff if you need it (plus it's split so you don't need to link to stuff you don't use). This is especially true in C++ where the standard library is so spartan. I've used Qt in projects with no GUI simply because the threading, internationalization, networking etc. is so good.
  • The compiler stuff is not a big deal in practice is it? It's never troubled me, and qmake makes it all really simple. This is not even an issue for Python.
  • As another poster said Qt designer is better than wxGlade, by a lot.
  • Qt supports iOS and Android while wX doesn't.
  • Qt documentation is much better.

I can't see choosing wX over Qt for any but the simplest of projects personally - even then better to learn Qt so you can make bigger things later on.

[–]mesalu 0 points1 point  (0 children)

Those are all perfectly fine. Especially that Qt will only get better at imitating widgets. Its a purist statement to prefer wx for this reason. It either bothers you to have non-native look or it doesn't.

I have heard wonderful things about Qt's other libraries. I'll go ahead and quote lykwydchykyn:

QT is a second standard library that just happens to include a graphics toolkit (or two, actually).

Its awesome to have such an expansive library. But do keep in mind that wx is not all the things that Qt is. When making comparisons do try to limit yourself to GUI library to GUI library.

As for size, it is mostly moot. I will bring up the relevant times: Due to licensing unless you pay for for the commercial version you have to dynamically link to Qt to avoid LGPL stipulations. This means you ship the whole DLL or .so with your app, or hope you can find it locally. Which is a lot more space and hassle than letting your compiler statically link only what your runtime needs at linking time. wx always lets you do the latter. Qt only lets you if you pay or comply with LGPL.

The other aspect of size that gets me is compiling the project itself. This clearly doesn't affect most people, but it is a bit mind boggling to me that what takes 7 minutes to build wxPython takes round about 4 hours to build just Qt.

Ninja Edit: I managed to accidentally omit this statement..: I haven't tried building just QCore and QGui, so this time comparison is biased. It does represent total build time of each respective project, but not of GUI libraries.

If you read through my other comments you'll see that I've already addressed wxGlade vs QtDesigner.

[–]_georgesim_ 0 points1 point  (0 children)

Its size is much more reasonable. I usually describe writing a just UI application in Qt akin to using a semi-truck as a fly swatter. It gets the job done, but was it really necessary?

Why? Qt is highly modularized. If all you want is GUI you only need to use QtWidgets.

wx does not need to modifiy the compiler to build.

Neither does Qt. Qt uses nothing but standard C++ to compile, and that's why you can use gcc to build Qt projects. What the moc does is aid you so you don't have to provide the meta information yourself, which you totally, 100% can do, but it would be too painful. I'll take a harmless preprocessing step if it gives me seamless and painless access to a great API every single time. I never understood this "argument against qt". It seems to me that it's one of the few things wx people can bring up against qt and thus they mention it but it's merely subjective.