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. Apple System Services and Qt.
Forum Updated to NodeBB v4.3 + New Features

Apple System Services and Qt.

Scheduled Pinned Locked Moved General and Desktop
9 Posts 4 Posters 4.9k 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.
  • E Offline
    E Offline
    Elijah Green
    wrote on last edited by
    #1

    Hello, everybody.
    I am using Qt to develop my desktop app on Windows, Linux Ubuntu and Mac Os X.
    In all those platforms i need integration into file viewer context menu.
    With Windows Explorer and Linux Nautilus it is easy (on linux i am just write plugin for Nautilus).
    But on Mac Os X not possible use custom plugins with Mac Finder.
    Apple present new interfase for this - System Services (http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/SysServices/introduction.html)
    But i can handle System Services messages only with Cocoa in Oblective C project.
    So my question: what is the best way to implement Qt app with Apple Sytem Services?

    1 Reply Last reply
    0
    • E Offline
      E Offline
      Elijah Green
      wrote on last edited by
      #2

      Maybe it is interesting for somebody.
      I fond solution. My solution not nice but i hope it work :)
      Solution:
      Create two app bundles:
      First with sytem services - Objective C app that must handle Apple System Services messages.
      Second with Qt app - main application.
      Put second bundle to resources folder in first bundle.
      Make first bundle LSUiElement-YES(in plist).
      When user open app in first bundle, this app must only start second bundle.
      And when app in second bundle receive Apple Secrvice Message - send this message to app in second bundle.
      First budle only launch second bundle and send to it all Apple Service messages.

      This is my solution.

      P.S. Sory for my bad english skill.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mohsen
        wrote on last edited by
        #3

        do you do service programming?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mohsen
          wrote on last edited by
          #4

          why not using sockets for transferring data between applications?

          1 Reply Last reply
          0
          • G Offline
            G Offline
            goetz
            wrote on last edited by
            #5

            You can mix "regular" C/C++ with both Objective-C and Objective-C++.

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply
            0
            • E Offline
              E Offline
              Elijah Green
              wrote on last edited by
              #6

              bq. You can mix “regular” C/C++ with both Objective-C and Objective-C++

              I thought about it. But how i know Objective C and Qt - bad mix.
              And even if i deside to use Objective C and Qt in one app - there is some problems:
              I need use NSApp to handle Apple Services messages. But also i need use QApplication -
              to provide my Qt GUI functionality. And i do not know how i can work with both this classes in one Application. Maybe you have some examples?

              bq. Why not using sockets for transferring data between applications?

              Interprocess communication is not a problem for me. My problem is How to properly unite the two applications in one bundle. But i think i found solution for this.

              However - best solution is mix NSApp and QApplication in one executable file. But i do not know how i can do it.

              1 Reply Last reply
              0
              • L Offline
                L Offline
                lgeyer
                wrote on last edited by
                #7

                I'm not an Mac expert but you can use QApplication::macEventFilter() to receive native events - there is no need to create another event loop (NSApplication). In addition, you can mix-match platform-specific code an Qt code to subscribe to those events.

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  goetz
                  wrote on last edited by
                  #8

                  If you want to include your App bundle into another one, just copy it there. See this "recent thread":/forums/viewthread/11058 for a similiar problem.

                  http://www.catb.org/~esr/faqs/smart-questions.html

                  1 Reply Last reply
                  0
                  • E Offline
                    E Offline
                    Elijah Green
                    wrote on last edited by
                    #9

                    [quote author="Volker" date="1319803919"]If you want to include your App bundle into another one, just copy it there. See this "recent thread":/forums/viewthread/11058 for a similiar problem.[/quote]

                    Yes, I just have to do so.

                    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