Live data from Hacker News

Ask HN: What would you use to make cross-platform desktop application?

news.ycombinator.com

61–70 of 116 posts

Re: Ask HN: What would you use to make cross-platform desktop application?

#61
post #39
post #27

Electron hasn't stopped Spotify from making the most widely used music client and VSCode from making the third most popular IDE.

Let's confront "worse is better" directly: more-popular software is not the same as better software. The Web is a race to the bottom in the quest for eyeballs. If eyeballs aren't what you desire, you can give the set of users you do have a much better experience: smoother interactions, better adaptation to system preferences, automated security and functionality updates to components via the OS distribution, better a…

I would make a counter-argument that software that gets used is indeed better than software that does not get used. Say what you want about the deficiencies of Electron, but it's proven to make software that people use. And like!

If you and OP want to disagree with the premise that used software is good software, and go in the opposite direction, that's fine - that's the point where we agree to disagree and go home.

Re: Ask HN: What would you use to make cross-platform desktop application?

#62

Obligatory: Qt. I've been tasked as a Qt dev at my day job for the past ~2.5 years writing cross-platform applications. It works, the documentation is pretty fantastic, and you'll find no shortage of help online to get over the admittedly decent learning curve if this is your first swing at "c++" programming. Edit: As mentioned below, PyQt is also pretty fantastic. My most recent venture into the PyQt world at work w…

I program in C++ professionally and about every 6 months I get the Qt tingle and think "I should really get around to learning Qt". But whenever I start to look into it I start to feel like I'm supposed to learning some custom language and it's not C++ at all - and how am I going to work this into the rest of my workflow

I've got a pretty vanilla workflow with CMake, the GNU tools, the STL and emacs/KDevelop/CLI to tie it together. It works across all platforms and all problem domains. But the internet is telling me that if I want to make native GUIs I have to be in the parallel universe of Qt with its own version of CMake, some magic custom build steps, its own IDE and some XML stuff that you really really should use otherwise things will get messy.

Is this just b/c Qt is old? Is there a bigger reason for the Qt-verse I'm just not seeing? And is this all a lot less of a headache than I'm imagining?

PS: Are there any clean frameworks that are tied to modern C++?

Re: Ask HN: What would you use to make cross-platform desktop application?

#63
post #34
post #27

Electron hasn't stopped Spotify from making the most widely used music client and VSCode from making the third most popular IDE.

I'd audaciously guess that it's the songs you play in it that makes the spotify app popular, not the pack of ones and zeroes that the developers thereof like better.

Ever hear of the Napster audio app? Not the p2p thing, the paid subscription app? It was just like Spotify, way before Spotify? Oh really, no, you hadn't? Could it be because the UI was terrible? Hm.

What about rdio? Back in the day, I remember noticing they had a much better music archive than Spotify in some areas like prog. Still, I never made the switch. (The way they organized music was terrible.) Apparently, neither did anyone else.

I could go on. All these Spotify competitors, all with decent libraries. How did Spotify end up winning?

I'm not saying that songs are unimportant, but if you have trash ux people are going to find an alternative.

Re: Ask HN: What would you use to make cross-platform desktop application?

#65
post #55

Obligatory: Qt. I've been tasked as a Qt dev at my day job for the past ~2.5 years writing cross-platform applications. It works, the documentation is pretty fantastic, and you'll find no shortage of help online to get over the admittedly decent learning curve if this is your first swing at "c++" programming. Edit: As mentioned below, PyQt is also pretty fantastic. My most recent venture into the PyQt world at work w…

> As mentioned below, PyQt is also pretty fantastic. Isn't Python just as slow as Electron?

Qt ought to be a thinner layer than Electron, and most computation-heavy things you'd do in Python end up in the C libraries that the modules are implemented in, anyhow.

Re: Ask HN: What would you use to make cross-platform desktop application?

#66
post #62

Obligatory: Qt. I've been tasked as a Qt dev at my day job for the past ~2.5 years writing cross-platform applications. It works, the documentation is pretty fantastic, and you'll find no shortage of help online to get over the admittedly decent learning curve if this is your first swing at "c++" programming. Edit: As mentioned below, PyQt is also pretty fantastic. My most recent venture into the PyQt world at work w…

I program in C++ professionally and about every 6 months I get the Qt tingle and think "I should really get around to learning Qt". But whenever I start to look into it I start to feel like I'm supposed to learning some custom language and it's not C++ at all - and how am I going to work this into the rest of my workflow I've got a pretty vanilla workflow with CMake, the GNU tools, the STL and emacs/KDevelop/CLI to t…

I don't know any such frameworks. Building a quality one takes a lot of work and time, I guess most of them are decades old at this point.

I've included some answers below:

* One can use Qt with CMake and for a large project probably should, because qmake can be quite limited.

* Qt Creator is not a must, but it's a good C++ IDE and was designed to work well with Qt. I think KDevelop should have pretty good Qt support too.

* The only XML I can think of are the UI designer files. If you prefer you can write the UI code by hand, but it's quite barbaric IMO :) Those files are just parsed and transformed into a ui_foo.h file which contains an inline setupUi method that one should call from their widget's constructor.

* The custom build step is running the meta-object compiler. It's necessary for signals and slots (Qt's ubiquitous subject-observer implementation) and for e.g. reflection if used. This is only really needed for classes that inherit from QObject, such as all the UI classes. If you want to be really hard-core, you can build the entire UI in code, without inheriting from the UI classes, and then I think this extra build step is not needed, but you will lose covenience and some customization possibilities. They've also added signal-to-lambda connections, so one is not obliged to use slots at all AFAIK.

All in all it's not bad at all. If one wants to have a cleanly separate Qt and pure C++ code-base it's possible with some glue code.

Re: Ask HN: What would you use to make cross-platform desktop application?

#67

Earlier quoted context omitted.

Seconded: - QT is a great and very-well designed library with solid performance, a fast release cycle and superb documentation. - It provides a rich and well thought-out component library. - It is used by many companies to build real-world applications. - It has a pretty liberal licensing scheme. The commercial license (if you need it) is not that expensive. - It provides bindings for many scripting languages like Py…

FWIW its version of CSS is just terrible, there are a lot of properties you cannot control with it (e.g. display properties), its style inheritance model is equally terrible (for some reason if you do .foo, the foo object will get the style as will all of foo's children), and forget about animations. To be fair, I did test it out at v5 and they may have improved it, but at that time it was by no means a fair thing to…

And that's why they call it QSS (Qt style sheets). :)

Re: Ask HN: What would you use to make cross-platform desktop application?

#68

Obligatory: Qt. I've been tasked as a Qt dev at my day job for the past ~2.5 years writing cross-platform applications. It works, the documentation is pretty fantastic, and you'll find no shortage of help online to get over the admittedly decent learning curve if this is your first swing at "c++" programming. Edit: As mentioned below, PyQt is also pretty fantastic. My most recent venture into the PyQt world at work w…

One real world success story for Qt:

Andy Brice (Oryx Digital, UK) has been developing his successful desktop software product, Perfect Table Plan (a seating planner software for events), in C++ and Qt, and selling it for over 10 years. (His newer product HyperPlan may be done in that stack too.) I've been a reader of his blog from some time: successfulsoftware.net. Many good tech and more biz tips there (for the software product biz - for desktop apps). And his app is cross-platform between at least two of the big 3 consumer OS's, IIRC (or maybe all 3) - Windows, Linux and MacOS.

Edit: I had also checked out Qt (v3 or 4) and tried some of the example apps (reading, compiling and running them) and also bought and read most of a book on Qt programming by some well-known Qt developers (don't remember the book or author names right now, but they may have included some of the original Qt creators). The impression I came away with was similar to that of some of the other commenters here - Qt seemed to be a well-designed library, not too difficult to learn, and with fairly good documentation at the time. I could understand the signals and slots mechanism it uses, without much trouble. Didn't get the moc part though (was not a C++ expert, also did not look much into moc) but it may not be needed to know that well, may be enough just to be able to use it.

Re: Ask HN: What would you use to make cross-platform desktop application?

#69
post #27

Electron hasn't stopped Spotify from making the most widely used music client and VSCode from making the third most popular IDE.

Slack is built on Electron too.

And there's constant talk of them going native because of how poor the current client performs...

Re: Ask HN: What would you use to make cross-platform desktop application?

#70

Obligatory: Qt. I've been tasked as a Qt dev at my day job for the past ~2.5 years writing cross-platform applications. It works, the documentation is pretty fantastic, and you'll find no shortage of help online to get over the admittedly decent learning curve if this is your first swing at "c++" programming. Edit: As mentioned below, PyQt is also pretty fantastic. My most recent venture into the PyQt world at work w…

Seconded: - QT is a great and very-well designed library with solid performance, a fast release cycle and superb documentation. - It provides a rich and well thought-out component library. - It is used by many companies to build real-world applications. - It has a pretty liberal licensing scheme. The commercial license (if you need it) is not that expensive. - It provides bindings for many scripting languages like Py…

- The commercial license (if you need it) is not that expensive.

I consider it very expensive. More than +US 3000/year for 1 developer?

The open-source is useless for desktop apps?.

Post reply on HN