Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Qt 6.5 Cmake iOS Objective-C Example

Qt 6.5 Cmake iOS Objective-C Example

Scheduled Pinned Locked Moved Solved Qt 6
3 Posts 2 Posters 409 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hello, how can I use Objective C with Qt6.5 cmake, can you give an example for this? For example, how to make a simple example like Objective C write hello to the screen when QML calls a function?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      I haven't done it yet with cmake but I think you have to start by enabling the language in addition to C++.

      One thing that you will have to take into account is that you need Objective-C++ in order to interact with your application and not Objective-C alone. Basically you create a C++ class that will wrap the Objective-C implementation. Qt does that for the macOS and iOS backends.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      ? 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        I haven't done it yet with cmake but I think you have to start by enabling the language in addition to C++.

        One thing that you will have to take into account is that you need Objective-C++ in order to interact with your application and not Objective-C alone. Basically you create a C++ class that will wrap the Objective-C implementation. Qt does that for the macOS and iOS backends.

        Hope it helps

        ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        @SGaist I made it bro thanks to you

        1 Reply Last reply
        0
        • System has marked this topic as solved on

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved