3 ms·
A lot. It has been a year since I last used Qt, but given the frequency with which I hit bumps in their integration with OSX, I'm quite sure that they haven't a
by jjoonathan 14y ago
A lot. It has been a year since I last used Qt, but given the frequency with which I hit bumps in their integration with OSX, I'm quite sure that they haven't all been fixed by now.
Keyboard shortcuts, drawers, and focus passing would randomly fail to work, since Qt was welded into the Cocoa event system and sometimes missed rather important edge cases. For instance, pressing the Esc key was programatically indistinguishable from clicking the 'Ok' button in custom drawers. More often, power-user shortcuts were overridden, didn't respect configuration changes, or entirely absent. Some views (table view IIRC) didn't even try to exactly mimic the native look and feel. Menus worked in fundamentally different ways on different platforms: if somebody designed an app to work on Windows, which does menus on a per-window basis rather than globally, menus would randomly appear/disappear on OSX. Oviously this wouldn't be a problem if all your users knew about it, but they won't. Integration with launch services was absent or crippled. Docking windows required tons of theming if you didn't want them to look like crap. Sometimes constraints or conventions imposed by cocoa were overridden, leading to subtle differences in the positioning of button text and so on. I spent 2 person-days hunting down the cause of a 2-pixel border between the edge of one view and the window backing; the hunt ended in failure when I realized that I would have to monkeypatch or completely replace Qt's layout system in order to get the view snug against the edge. Sometimes Qt's abstraction layer led to unacceptable performance tradeoffs that would be easy to solve on any given platform but were simply not addressed in the Qt API. In general, the UI design tools didn't enforce platform-specific conventions and were miles behind XCode in terms of ease-of-use.
I had a few problems that weren't specific to integration, but they were just as frustrating. The documentation, while great for an open source project, was still far behind the status quo for native libraries. I found their documentation on coordinate systems very difficult to understand (in comparison with the Cocoa documentation) and sometimes it was just plain wrong, e.g. about mouse event propagation within graphics views (and you would think that would be a fairly heavily trafficked page, no?).
If you want your Qt app to seem native, you had better be prepared to dig through Qt itself and patch its deficiencies. This often means being intimately familiar with the native libraries, since the bugs reside at edge-cases the Qt devs weren't thinking about when they wrote the code.
Honestly, if I had to do it all over again, I think I would have just insisted coding the front end twice using native libraries and development libraries each time.
- nnq 14y ago...a cross-platform UI toolkit will never be usable by just recompiling and having you GUI work just fine on another platform. Especially MacOS, which was always somewhat special about everything! It's good to learn just one GUI toolkit, but you'll need to split your codebase and even if you have the same base UI for different platforms, accept that lots of windows and dialogs and menus will have one MacOS version and one Windows version (usually you can skip the Linux one because Windows-style apps play well with Linux except for when abominations like Unity fuck things up...).
- jjoonathan 14y agoI never expected the UI to translate perfectly and effortlessly from one platform to another, since (as you mention) that's clearly impossible due to divergent design decisions in the platforms themselves. However, it is not inconceivable that one could maintain a unified codebase and use a few platform-specific hacks to ensure that your app "philosophically matched" each OS. Quite possibly, one could still save net effort by implementing these patches vs maintaining a split codebase. If this were the case, I would be happy with Qt and I would sing its praise. My difficulty with Qt stemmed mostly from the bugs. It simply lacked the polish of Cocoa and .NET in a way which noticeably and negatively impacted productivity. "Platforms are different" is no excuse for incorrect documentation, layout engines that are 1-2 pixels off at the edges, broken/incomplete keybindings, missing integration with launch services, and so on. I have the utmost respect for the Qt team -- I wouldn't have guessed that anyone could come so close to unifying the major UI kits -- but Qt still fell short of where it needed to be if it wanted to compete with the native toolkits.