Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to use QIOApplicationDelegate
Forum Updated to NodeBB v4.3 + New Features

How to use QIOApplicationDelegate

Scheduled Pinned Locked Moved Solved Mobile and Embedded
6 Posts 3 Posters 1.6k Views 3 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
    saqirltu
    wrote on last edited by
    #1

    Hi, from a lot of posts I found QIOApplicationDelegate in Src/qtbase/src/plugins/platforms/ios/qiosapplicationdelegate.h is the thing to use to achieve AppDelegate in iOS apps. My question is how to use it. I found people speaking about either category extending or subclassing. Will they both work?

    Another more important question, after implementing the class, shall I create an instance of it in main.cpp?

    Thanks all!

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

      Hi and welcome to devnet,

      It's not a class you usually subclass, it's a class used by the QPA which can change from a version of Qt to the other.

      What do you need to subclass for ?

      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
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        It's not a class you usually subclass, it's a class used by the QPA which can change from a version of Qt to the other.

        What do you need to subclass for ?

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

        Hi @SGaist

        I need it for handling the push notifications.

        I kinda managed it by following @benlau 's approach.
        https://github.com/benlau/quickios/blob/master/examples/quickiosexample/appdelegate.mm

        Now wondering if this is the appropriate way of doing it.

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

          AFAIK, it is. I'd just check Qt's sources to see if the method is already implemented and is doing something.

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

          benlauB 1 Reply Last reply
          0
          • SGaistS SGaist

            AFAIK, it is. I'd just check Qt's sources to see if the method is already implemented and is doing something.

            benlauB Offline
            benlauB Offline
            benlau
            Qt Champions 2016
            wrote on last edited by benlau
            #5

            @SGaist said:

            AFAIK, it is. I'd just check Qt's sources to see if the method is already implemented and is doing something.

            I have checked Qt source and it did nothing. That is why I suggest people to do so. However, I found that there has other library project that will override the method too. So, people should use at their own risks.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              saqirltu
              wrote on last edited by
              #6

              Thanks guys!

              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