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. How does Qt call Swift code?
Qt 6.11 is out! See what's new in the release blog

How does Qt call Swift code?

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 4 Posters 1.6k Views 2 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.
  • S Offline
    S Offline
    senmx
    wrote on last edited by
    #1

    How does Qt call Swift code?
    Tks.

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

      Hi,

      Qt does not. The Apple related backends are using Objective-C/C++.

      What do you want to do ?

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

      S 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        Qt does not. The Apple related backends are using Objective-C/C++.

        What do you want to do ?

        S Offline
        S Offline
        senmx
        wrote on last edited by
        #3

        @SGaist Okay, it would be great if it could be called.

        JKSHJ 1 Reply Last reply
        0
        • S senmx

          @SGaist Okay, it would be great if it could be called.

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          @senmx said in How does Qt call Swift code?:

          it would be great if it could be called.

          It can. But you must write your own wrapper: https://github.com/dredwardhyde/swift-cpp-wrapper-example#how-to-call-swift-from-c-plain-closure-without-context

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          S 1 Reply Last reply
          1
          • K Offline
            K Offline
            kameshbhai32
            wrote on last edited by
            #5

            It's nothing like Swift but then again, Qt has existed for a long time. It's never going to be as clean as UIKit or SwiftUI.

            S 1 Reply Last reply
            0
            • JKSHJ JKSH

              @senmx said in How does Qt call Swift code?:

              it would be great if it could be called.

              It can. But you must write your own wrapper: https://github.com/dredwardhyde/swift-cpp-wrapper-example#how-to-call-swift-from-c-plain-closure-without-context

              S Offline
              S Offline
              senmx
              wrote on last edited by
              #6

              @JKSH Thank you.

              1 Reply Last reply
              0
              • K kameshbhai32

                It's nothing like Swift but then again, Qt has existed for a long time. It's never going to be as clean as UIKit or SwiftUI.

                S Offline
                S Offline
                senmx
                wrote on last edited by
                #7

                @kameshbhai32 Thank you.

                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