How do I know if I have Qt Carbon or Cocoa installed on Mac OS X?

I installed QtSDK, but I can not find the documentation anywhere that indicates whether it uses a version of Cocoa or Carbon. Can I find out what has been installed? If not, is it possible to install the Cocoa version from the dmg library only? Qt version is 4.6.3, system version is 10.6.4.

+7
qt macos
source share
3 answers

When using qmake, the following should work:

There is QT_MAC_USE_COCOA , so a simple test:

 ... #ifdef QT_MAC_USE_COCOA std::cout << "Cocoa!" << std::endl; #else std::cout << "Carbon!" << std::endl; #endif 
+4
source share

I don't have a Mac nearby to check, checks that the QPaintEngine type can do the trick. I believe Carbon will return QPaintEngine :: QuickDraw and Cocoa QPaintEngine :: CoreGraphics, but I'm not sure.

+1
source share

Quote:

The current binary code for Qt is built in two versions: 32-bit Carbon and full-featured Cocoa (32-bit and 64-bit). If you want to use a different setting for Qt, you must build from scratch. Carbon or Cocoa is selected when setting up packaging for construction. The setup process selects Carbon by default to tell Cocoa to use the - cocoa flag. configure for 64-bit architecture using one of the -arch flags

 10.4 Tiger Carbon 32 PPC/Intel Yes 10.5 Leopard Carbon 32 PPC/Intel Yes 10.5 Leopard Cocoa 32/64 PPC/Intel Yes 10.6 Snow Leopard Cocoa/Carbon 32 PPC/Intel Yes 10.6 Snow Leopard Cocoa 64 Intel Yes 

Further information is available at http://doc.trolltech.com/4.6/developing-on-mac.html#carbon-or-cocoa .

+1
source share

All Articles