I dream of seeing a day in ten years or so where everyone expects right once run everywhere native look and feel applications out of Qt, a toolkit that provides you mechanism to access the full power of your target devices without having to lock yourself into whatever vendors SDK is and thus forcing you to rewrite the same program 5 times for 5 different target devices.
Its not there yet - just the other week I was arguing with someone on reddit about the usability of Qt on mobile and conceded it lacks a prebaked gesture support library to easily just do a two finger swipe rather than having to use the multitoucharea type to specify how two finger motion works - but it is getting so very close.
Someone made me aware that they are now in yet another reboot for mobile support.
Using C++ with standard libraries like Boost plus platform specific language is less effort than re-writing QML for each platform, which still doesn't feel native, while having anyway the work to wrap platform API ourselves.
Likewise, QML is just plainly useless on the desktop, and much slower to booth. Unfortunately, the performance regression in Qt5 is there also if you don't use it, and that shouldn't be.
Qt5 being slower than Qt4 is the main reason I've been moving slowly towards copperspice (http://www.copperspice.com/) for newer projects. The fact that moc is no longer necessary removes also the main paint point of qt.
I'm just curious of how much force multiplier you can get writing the menus with QML and the game with Qt3d.
Forgive me for not knowing, since I've never used Qt Widgets before. I'm writing a desktop app with QML and it's fast and smooth thanks to the OpenGL acceleration.
For example, since I work in visualization, I often tie data widgets to the GL canvas in order to provide realtime feedback. I also use Qt5 in order to provide keyboard accelerators. With QT5 the rendering latency grew so high that I couldn't provide realtime feedback anymore, and I had to batch requests (and finally reverted to Qt4).
Incidentally Qt5 widgets can be used in a GL context directly, but are way too slow to render and manage events to be used consistently at 60 fps (they're not designed for that, so their scope in this sense is not as broad as it can really be). It's actually faster to give them their own GL context in order not to interfere with your pipeline, which kinds-of defeat the point.
I've also found that the additional JS glue doesn't provide any benefit unless you go entirely QML.
Also why on earth do they tout being built with autotools as a feature?!
* It's quite incomplete. There are a lot of things you just can't do in it. For example try doing a widget of the kind you'd use for compilation output in an IDE. There is a multiline text editor widget, but the only efficient operation is appending text - you can't remove the first line for example.
* If you decide you will write your own QML widget (e.g. for the compilation output), you find that there is no way to render text! The scene graph text nodes are still private.
* You have to use Javascript (ugh)
* There's quite a lot of friction converting C++ types to Javascript and vice versa. Especially with lists and arrays. For example when you access a C++ array from Javascript it has to copy the whole array into a native Javascript array, and then modifications are lost.
* The scope of files and IDs is quite messy - parents can refer to their children's IDs, so there is no concept of data encapsulation. To be honest I still haven't totally worked out the rules, but they're a mess in any case.
* Dynamically creating dialogs and UI elements is a bit of a mess. The "standard" way to have dialogs is (more or less) to create all dialogs the program needs at startup and hide them all until needed. Obviously that doesn't scale well for things like tooltips. Creating them dynamically is rather painful (especially when there are no examples for how to do it!)
QML is definitely a nice idea, but I think they need to give it a third try, and probably not use Javascript.
Additionally, it only JUST got a TreeView (Qt 5.5 I believe) and a lot of additional widgets you would need to implement a regular desktop app are just missing.
Thankfully Qt just announced that their commercial-only components will be added to the open source version soon, including the QML-to-C++ compiler.
I haven't had an opportunity to try it myself but they claim it improves startup times significantly.
You'll want to use a splash screen implemented with minimal UI code (no widgets of any kind yet, just an image with a background). While showing the splash screen, load dynamically a minimal main UI and some critical services -- only the parts that will affect the initial view.
Then hide the splash screen. You'll have a small bit of time after the UI becomes visible and before the user will actually use it. You'll want to use this time to load the rest of your services and preload more UI components to avoid the creation lag on UI thread later on.
I've done this kind of three-stage loading on Android without technical users even realizing it's not a native app. Would I do it again? Not really if platform native code is an option. There are too many details one has to handle when imitating platform visuals and interaction.
Does QT's class hierarchy map cleanly to Go? Is it just interfaces everywhere?
(I'm not trying to start a language war, just genuinely curious.)
That was kind of a ramble, but thats the gist of it.
https://en.wikipedia.org/wiki/Name_mangling#How_different_co...
As to the very interesting question of how it's handled here, it looks like part of the project (the "qtdrv" folder) is a shared library written in C++ that includes Qt, wraps the desired functionality, and exports it as C-style symbols (with extern "C"). This is a pretty standard way of circumventing the name mangling problem.
What I find interesting is that everything appears to be wrapped into a single exported function "qtdrv". Might be a wrapping technique that I'm not aware of, or maybe I'm completely misreading the source. I'm actually quite interested in knowing how the wrapping code was generated, having projects where the same kind of C++ wrapping is required.
Calling into C++ is generally a big problem in any programming language though, and for most, you have to write a C wrapper.
You can perfectly write a C++ library and expose a C-safe subset. I've done so many times.
The problem arises if you need to expose objects (with virtual methods), which C obviously doesn't have as the ffi is basically restricted to plain functions and record types.
It appears that GoQt has this giant pile of wrappers around C++ types, casting pointers back and forth:
https://raw.githubusercontent.com/visualfc/goqt/master/qtdrv...
I would have expected this to require an `extern "C"` declaration. I'm sort of surprised it doesn't, but maybe the common C++ ABIs match the C ones if only C types are passed to and from the function?
(Also, is this file auto-generated?)
Of course, moving can cause problems for Go pointers in C land, but keeping Go pointers beyond a cgo function call will be prohibited in Go 1.6:
Maybe https://www.appveyor.com/ would work out for you? It's free for OSS projects.
And, in the modern world of big computers (desktops and laptops), it is not all that big of a deal (I don't actually know, but I would guess it's on the order of a few MB, maybe in the tens of MBs), and from what I can tell a lot of applications are already built statically for distribution to Windows and Mac OS X.
I agree with you on "big computers" to an extent. I just bought a temporary [1] laptop. It's beefy enough, but only has 2GB of RAM and 32GB of relatively slow flash storage [2].
Mobile broadband prices have been falling in Australia but it's still at the point where I have to thing before downloading anything >5MB.
[1]: http://www.pendo.com.au/pendopad/pendopads-windows-8/pendo11... (I didn't pay RRP)
[2]: Okay, okay, it's still eMMC, but it feels slow.
I do think changes in how shared libraries are shipped or managed may help. I've had ideas for ages around using cryptographic hashes but have no time to experiment with such things.
This bit me on the ass when Apple forced a libstdc++ update on OS X 10.3 with a new ABI, permanently breaking all C++ compilation on my Mac. Compiling C++ programs for 10.3 was still possible, but you needed a 10.4 machine, the latest Xcode, and compatibility libraries to do it.
And people make fun about Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch in Wales.
http://doc.qt.io/qt-5/licensing.html
I see nothing in that list that seems different or that would prevent one from building commercial products on Qt without licensing fees.
As a result, some issues arise, such as code that is stuck on GPLv2 (e.g. removed the upgrade clause like the Linux kernel) may be incompatible with LGPLv3.
This blog tries to explain some of the issues. http://nmav.gnutls.org/2013/03/the-perils-of-lgplv3.html
To make a car analogy, if the tires are made under LGPLv3, you got to tell them what kind of rubber it is made of and permit car owners to change the tire without the car saying "unapproved parts used, so I will refuse to start now until you have bought approved tires from an official car dealer". Every car made before 2000 managed to do this without even thinking about it.
FSF consider GPLv2 to be incompatible with this deal from a US-legal view, which is the same view that claim "further restrictions" only covers restrictions made from software licenses.
[1]: https://www.gnu.org/licenses/gpl-faq.html#gpl-compat-matrix