Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

    Solved How to use QIOApplicationDelegate

    Mobile and Embedded
    3
    6
    1094
    Loading More Posts
    • 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
      saqirltu last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • S
          saqirltu @SGaist last edited by

          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 Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            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

            benlau 1 Reply Last reply Reply Quote 0
            • benlau
              benlau Qt Champions 2016 @SGaist last edited by benlau

              @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 Reply Quote 0
              • S
                saqirltu last edited by

                Thanks guys!

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post