Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Use Qt APIs with Swift 5.9 and the new C++ interoperability
Forum Updated to NodeBB v4.3 + New Features

Use Qt APIs with Swift 5.9 and the new C++ interoperability

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 1.2k Views 1 Watching
  • 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.
  • A Offline
    A Offline
    Antonio C
    wrote on last edited by
    #1

    Hello everyone,

    at the latest WWDC Apple announced C++ interoperability from the upcoming Swift 5.9, allowing import and call C++ APIs from Swift and viceversa. More here:
    https://www.swift.org/documentation/cxx-interop/#overview

    It seems that it's enough to import C++ headers file to be able to use the imported objects from Swift.

    I am not expert at all the subject, but I am wondering if this interop would allow to use Qt SDK from Swift, without any language binding.
    Swift is now cross platform (macOS, Linux, Windows) and with Qt would be a killer match.

    Would it be easy to test it out?

    D 1 Reply Last reply
    0
    • A Antonio C

      Hello everyone,

      at the latest WWDC Apple announced C++ interoperability from the upcoming Swift 5.9, allowing import and call C++ APIs from Swift and viceversa. More here:
      https://www.swift.org/documentation/cxx-interop/#overview

      It seems that it's enough to import C++ headers file to be able to use the imported objects from Swift.

      I am not expert at all the subject, but I am wondering if this interop would allow to use Qt SDK from Swift, without any language binding.
      Swift is now cross platform (macOS, Linux, Windows) and with Qt would be a killer match.

      Would it be easy to test it out?

      D Offline
      D Offline
      DanieleNiero
      wrote on last edited by
      #2

      @Antonio-C I don't have an answer for you, unfortunately, but I 'm interested too about this possibility. Did you tried anything yet, did you have some success?

      Regards.

      1 Reply Last reply
      0
      • F Offline
        F Offline
        Felix_F_.-
        wrote on last edited by
        #3

        cool idea!

        1 Reply Last reply
        0
        • B Offline
          B Offline
          bogong
          wrote on last edited by bogong
          #4

          This message might be a little outdated but today got published example of using Swift/CPP interoperability with CMake/XCode. There were some troubles for me with Ninja. it's described here

          For now writing fully featured example of using Swift/CPP interoperability in Qt/QML applications. hope will find a time to finish it soon.

          1 Reply Last reply
          0
          • B Offline
            B Offline
            bogong
            wrote on last edited by bogong
            #5

            Here the examples of how to use CPP in Swift with XCode projects.

            1 Reply Last reply
            0

            • Login

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