Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. To Subclass NSApplication in QApplication.
Forum Updated to NodeBB v4.3 + New Features

To Subclass NSApplication in QApplication.

Scheduled Pinned Locked Moved Language Bindings
7 Posts 2 Posters 6.4k 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.
  • N Offline
    N Offline
    nehaR
    wrote on last edited by
    #1

    Hi,

    I am working on Qt4.7 on mac os 10.5.8(Leopard). I want to use cocoa application with Qt application, Can anybody suggest me how to subclass NSApplication within QApplication.

    Thanks & Regards,
    Neha

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

      You might want to look at src/gui/util/qsystemtrayicon_mac.mm for some usage of NSApplication.

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

      1 Reply Last reply
      0
      • N Offline
        N Offline
        nehaR
        wrote on last edited by
        #3

        Thanks for the reply, If i want to use Qt Class function in Cocoa class, then how can i use it?

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

          That depends on the class and method. Some of them (most notable the GUI classes and many QObject derived classes) need a Qt event loop running (which is usually achieved by starting exec() on a QApplication). Others do not depend on this (e.g. QString, the container classes, the XML classes) and can be used directly.

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

          1 Reply Last reply
          0
          • N Offline
            N Offline
            nehaR
            wrote on last edited by
            #5

            I want to call QtGui class function in cocoa class,, how can i call Qtcode class function in cocoa class, can you explain it with an example?

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

              Sorry, I have never used Qt this way before, so I cannot provide a sample code.

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

              1 Reply Last reply
              0
              • N Offline
                N Offline
                nehaR
                wrote on last edited by
                #7

                Ok, not an issue, i will try to do something else.

                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