Important: Please read the Qt Code of Conduct -

If I build a game in Qt for android and iOS can i include objective C toolkits in it like game center?

  • I want to build a game for both android and iOS but I'm afraid I wont be able to make it fully functional as if I were to just build one in objetive C. So can I use toolkits from android and or iOS in Qt? or can I make it in Qt and add them in later with a different software?

  • Lifetime Qt Champion

    Hi and welcome to DevNet,

    Nothing forbids you to use what is called objective-c++ (mixing c++ and objective-c) have a look in the sources of Qt for files call *.mm.

    If you have some common interface you want to use, you'd better have plain c/c++ style headers and have everything objective-c related in the implementation file (and/or private header)

    Hope it helps

  • thanks it does, but what about using android toolkits? Can I simply not use those in my game since they are in java?

  • Lifetime Qt Champion

    It all depends on how much you want to use of the underlying system. If you want to integrate some deeper parts of Android (like their equivalent for game center), you should ask on the Necessitas mailing list, you'll have more chance to reach someone experienced that can answer your questions. Also look for a c api to see if any exists.

    Hope it helps

  • thanks it does.

  • also, what about using QML with objective C? can I not do that? and do I need QML to make interactive touch based games on Qt?

  • Lifetime Qt Champion

    You don't need QML, it's one way to do it. You can use OpenGL and/or widgets.

    AFAIK, you can't directly call objective-c from QML, you would have to create a c++ interface to connect to QML and from that interface make your call to the objective-c framework. Have a look at the QML doc, especially the part talking about QML/C++ interaction

  • Hi,
    if you like using QML for your game, you can consider V-Play, a Qt-based game engine we have been working on for the last 1.5 years. It contains platform-specific plugins like "Game Center":, Flurry or native Facebook SDK accessibe from QML, together with other gaming components for 2D games. We'll add a cross-platform solution (supported on all platforms) for leaderboards, achievements, challenges and in-app-purchases til this summer. It's free for the desktops, Symbian and MeeGo and also free to try for your iOS or Android test devices and available for download "here":

    Cheers, Chris

Log in to reply