Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I tell on Mac OS X if I have the Carbon or Cocoa version of Qt installed?

Tags:

macos

qt

I installed the QtSDK, but I can't find any documentation anywhere that specifies whether it uses the Cocoa or Carbon version. Can I find out which got installed? If not, is it safe to install the Cocoa version from the Library only dmg? Qt version is 4.6.3, system version is 10.6.4.

like image 578
TraxusIV Avatar asked Jul 29 '10 21:07

TraxusIV


1 Answers

When using qmake, the following should work:

There is QT_MAC_USE_COCOA, so a simple test would be:

...
#ifdef QT_MAC_USE_COCOA
    std::cout << "Cocoa!" << std::endl;
#else
    std::cout << "Carbon!" << std::endl;
#endif 
like image 178
Frank Osterfeld Avatar answered Sep 22 '22 23:09

Frank Osterfeld