Building a Mac and Windows GUI Application

血红的双手。 提交于 2019-12-03 05:48:20
Emile Cormier

I think you might be ruling out Qt too quickly. This guy has reported that he publishd a Qt-based app on the Mac App Store.

According to this related answer, you can specify the Qt build target to use Cocoa instead of the deprecated Carbon API.

This Qt bug where some plist file would be written a location not approved by Apple has been resolved in version 4.8.

This Qt article discusses special features introduced to support Mac's native look and feel.


With regards to C++, there are generally no cross-platform issues if you use libraries such as Qt or Boost to abstract out the platform-dependent bits (Boost.Asio, Boost.Filesystem, and Boost.Thread come to mind, Qt has similar abstractions for networking, files, and threading).

C++ is definitely an "expert friendly" language. If it's possible to use Python and PySide bindings for Qt, while still being able to publish to the App Store, then I'm guessing that might be your best bet.

If you end up using C++, then I strongly suggest that you learn to use all the facilities at your disposal which will minimize manual memory management and raw pointers. Learn about container classes, string class, and smart (reference-counting) pointers.

I ended up going with Python for shared logic.

On Mac, I used py2objc as the bridge, and py2app with some custom configuration for packaging. On Windows, I used Python and wxWidgets directly.

This allowed me to have native UIs on both platforms, and worked out quite nicely for lower level code.

However, I didn't actually get very far on the app before moving on to more exciting ventures. If any readers were hoping to use this question/answer as a reference, I strongly suggest looking at all the technologies listed and drawing your own conclusions.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!