prosseek
prosseek

Reputation: 190659

Qt or wxWidgets on Cocoa?

I was told that the newest Qt is Cocoa based, and as so, it's 64 bit. And Cocoa is Object-C based, whereas Qt is C++ based.

Upvotes: 2

Views: 1090

Answers (4)

user122933
user122933

Reputation:

Qt. Mixing Cocoa and Qt is easy peasy: http://www-sop.inria.fr/dream/blog/2009/03/mixing-cocoa-and-qt-through-carbon/

Upvotes: 1

RyanWilcox
RyanWilcox

Reputation: 13974

Objective-C++ lets you combine C++ and Objective-C in the same source file. So you can do interesting things here. For example, I've created C++ classes that call Cocoa things like NSNotification before.

So I suspect you'd just write in C++, calling C++ objects... which are implemented as C++ wrappers of Objective-C methods.

wxWidgets has a similar thing going on, wxCocoa, but last I heard that was the Mac platform of the future, meaning that they are still building it.

Upvotes: 2

rubenvb
rubenvb

Reputation: 76519

Qt is C++, period. Interfacing one language with another (in this case C/C++/Objective-C/Objective-C++) can be quite straightforward.

Qt uses Cocoa by default, but can still be 32-bit, see http://doc.qt.nokia.com/4.7-snapshot/developing-on-mac.html for some general mac specific info.

Upvotes: 1

Cogwheel
Cogwheel

Reputation: 23217

Objective C is a strict superset of C. That means any valid C program is compilable with an Objective C compiler. Since C++ is backwards compatible with C, connecting them is fairly trivial. The C++ part just needs to be aware of some of Objective C's runtime libraries.

Upvotes: 1

Related Questions