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. iOS not receiving touchEvent at app start up
Forum Updated to NodeBB v4.3 + New Features

iOS not receiving touchEvent at app start up

Scheduled Pinned Locked Moved Solved Mobile and Embedded
16 Posts 3 Posters 4.3k 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.
  • matthew.kuiashM Offline
    matthew.kuiashM Offline
    matthew.kuiash
    wrote on last edited by
    #1

    I'm porting my Qt 5.7.1 application to iOS, So, to clarify it's working fine on Android and Desktop (macOS). I'm using XCode 8.2 on Sierra. Using the iOS 10.2 SDK. I'm building and launching the app from XCode but also using Qt Creator as my man IDE as there are other platforms in there to support.

    When my application starts no touch events are received although I see all the usual events. The "platform_opengl_window" referenced in the debug log is derived from QWindow and my own "i_platform_window_opengl" interface (for various porting and testing reasons).

    The weirdness is this. The app receives no touch events until I swipe up from the bottom of the screen to open the iOS "utility" panel (not sure what it's proper name is). At which point my application becomes inactive (this is good!) and then I DO start to receive touch events.

    Here's a debug log. I would appreciate some insight. I shall continue debugging!

    platform_window_opengl.cpp:190:event: QEvent::Type(PlatformSurface)
    platform_window_opengl.cpp:190:event: QEvent::Type(Show)
    platform_window_opengl.cpp:190:event: QEvent::Type(FocusIn)
    platform_window_opengl.cpp:190:event: QEvent::Type(InputMethodQuery)
    platform_window_opengl.cpp:190:event: QEvent::Type(InputMethodQuery)
    platform_window_opengl.cpp:190:event: QEvent::Type(InputMethodQuery)
    platform_application.cpp:74:on_applicationStateChanged: Qt::ApplicationState(ApplicationActive)
    platform_window_opengl.cpp:190:event: QEvent::Type(Resize)
    platform_window_opengl.cpp:190:event: QEvent::Type(Expose)
    platform_window_opengl.cpp:190:event: QEvent::Type(ChildAdded)
    platform_window_opengl.cpp:190:event: QEvent::Type(Resize)
    platform_window_opengl.cpp:190:event: QEvent::Type(Move)
    platform_window_opengl.cpp:190:event: QEvent::Type(Expose)
    platform_window_opengl.cpp:190:event: QEvent::Type(UpdateRequest)
    ...
    # lots of update requests but no touch events at all
    ...
    platform_window_opengl.cpp:190:event: QEvent::Type(UpdateRequest)
    # Swipe up from the bottom of the screen to activate OS functions, app goes inactive (perfect)
    platform_application.cpp:74:on_applicationStateChanged: Qt::ApplicationState(ApplicationInactive)
    # This is the strangest bit, after the app inactive I start receiving touch events!
    platform_window_opengl.cpp:190:event: QEvent::Type(Expose)
    platform_window_opengl.cpp:190:event: QEvent::Type(UpdateRequest)
    platform_window_opengl.cpp:190:event: QEvent::Type(TouchBegin)
    platform_window_opengl.cpp:203:touchEvent:
    platform_window_opengl.cpp:190:event: QEvent::Type(TouchUpdate)
    platform_window_opengl.cpp:203:touchEvent:
    platform_window_opengl.cpp:190:event: QEvent::Type(TouchEnd)
    platform_window_opengl.cpp:203:touchEvent:
    ...
    platform_application.cpp:74:on_applicationStateChanged: Qt::ApplicationState(ApplicationActive)
    # Application back to active and everything works as it should.
    platform_window_opengl.cpp:190:event: QEvent::Type(Expose)
    platform_window_opengl.cpp:190:event: QEvent::Type(UpdateRequest)
    ...
    platform_window_opengl.cpp:190:event: QEvent::Type(UpdateRequest)
    platform_window_opengl.cpp:190:event: QEvent::Type(UpdateRequest)
    platform_window_opengl.cpp:190:event: QEvent::Type(TouchUpdate)
    platform_window_opengl.cpp:203:touchEvent:
    platform_window_opengl.cpp:190:event: QEvent::Type(TouchUpdate)
    platform_window_opengl.cpp:203:touchEvent:
    platform_window_opengl.cpp:190:event: QEvent::Type(UpdateRequest)
    platform_window_opengl.cpp:190:event: QEvent::Type(UpdateRequest)
    platform_window_opengl.cpp:190:event: QEvent::Type(UpdateRequest)
    platform_window_opengl.cpp:190:event: QEvent::Type(UpdateRequest)
    platform_window_opengl.cpp:190:event: QEvent::Type(TouchUpdate)
    

    Many thanks, Matthew.

    The legendary cellist Pablo Casals was asked why he continued to practice at age 90. "Because I think I'm making progress," he replied.

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

      Hi and welcome to devnet,

      Sounds strange, I'd recommend taking a look at the bug report system to see if it's something known.

      Also, are you using QtQuick or QWidget ?

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

      matthew.kuiashM 2 Replies Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Sounds strange, I'd recommend taking a look at the bug report system to see if it's something known.

        Also, are you using QtQuick or QWidget ?

        matthew.kuiashM Offline
        matthew.kuiashM Offline
        matthew.kuiash
        wrote on last edited by
        #3

        @SGaist Hi & thanks! QWidget (sort of). I'm using none of the QWidget stuff as I have my own OpenGL/GLES code (not much of an abstraction, i like it that way as it's game code!) So I'm using QGuiApplication and QWindow as well as Qt OGL surface abstractions.

        I don't use those classes directly in my code, there's a very thin abstraction layer so I can do work that I need on all platforms, notably setting up app specific persistent storage areas and kicking a derived store/restore function.

        I'm trying to whittle the code down to a minimum amount required to reproduce the problem.

        I'll update on Monday.

        I'm no Qt noob BTW. I've done a couple of platform ports and was active at Qt Centre from about 10 years ago under a couple of different aliases. If I have to dig into the guts of Qt that's no problem.

        The legendary cellist Pablo Casals was asked why he continued to practice at age 90. "Because I think I'm making progress," he replied.

        1 Reply Last reply
        0
        • SGaistS SGaist

          Hi and welcome to devnet,

          Sounds strange, I'd recommend taking a look at the bug report system to see if it's something known.

          Also, are you using QtQuick or QWidget ?

          matthew.kuiashM Offline
          matthew.kuiashM Offline
          matthew.kuiash
          wrote on last edited by
          #4

          @SGaist I think this ... https://bugreports.qt.io/browse/QTBUG-53874 is related.

          The legendary cellist Pablo Casals was asked why he continued to practice at age 90. "Because I think I'm making progress," he replied.

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

            Might be, note that both platforms have different backend.

            Could you also test with Qt 5.7.0 ? That way it could help pinpoint whether it's something new to 5.7.1.

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

            matthew.kuiashM 2 Replies Last reply
            0
            • SGaistS SGaist

              Might be, note that both platforms have different backend.

              Could you also test with Qt 5.7.0 ? That way it could help pinpoint whether it's something new to 5.7.1.

              matthew.kuiashM Offline
              matthew.kuiashM Offline
              matthew.kuiash
              wrote on last edited by
              #6

              @SGaist I noticed that. That is the difference between platform plugin ios and cocoa.

              I still haven't got to the bottom of the problem but instead I switched my "platform_window_opengl" to use QOpenGLWindow. That code path fixes the problem. I still don't need to pull in the widget library (don't need/use it) so for now I'm happy.

              When I get a chance I'll dig into the implementation of QOpenGLWindow vs QWindow (with own context creation) to see what functionality is missing.

              Does it still sound worthy of bug repoting to you?

              The legendary cellist Pablo Casals was asked why he continued to practice at age 90. "Because I think I'm making progress," he replied.

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

                Yes please. Even if the recommended way to build mobile UI is QML, it's better to have that kind of stuff known.

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

                matthew.kuiashM 1 Reply Last reply
                0
                • SGaistS SGaist

                  Might be, note that both platforms have different backend.

                  Could you also test with Qt 5.7.0 ? That way it could help pinpoint whether it's something new to 5.7.1.

                  matthew.kuiashM Offline
                  matthew.kuiashM Offline
                  matthew.kuiash
                  wrote on last edited by
                  #8

                  @SGaist I've tested with 5.7.1 and 5.8. I'm very sorry but as a solo developer I don't (at the moment) have time to run those sort of regressions.

                  The legendary cellist Pablo Casals was asked why he continued to practice at age 90. "Because I think I'm making progress," he replied.

                  1 Reply Last reply
                  0
                  • SGaistS SGaist

                    Yes please. Even if the recommended way to build mobile UI is QML, it's better to have that kind of stuff known.

                    matthew.kuiashM Offline
                    matthew.kuiashM Offline
                    matthew.kuiash
                    wrote on last edited by
                    #9

                    @SGaist I've got weird and horrible news.

                    I let my iPhone update to 10.2 (from 9.3) last night and now the problem doesn't occur!

                    These sort of things make me go... ARGH!

                    The legendary cellist Pablo Casals was asked why he continued to practice at age 90. "Because I think I'm making progress," he replied.

                    1 Reply Last reply
                    0
                    • R Offline
                      R Offline
                      Rameshguru
                      wrote on last edited by
                      #10

                      hi,
                      now i start qt basic programming,can i use c sharp .dl
                      l in qt programming ?

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

                        @matthew-kuiash sure thing, I understand. Ok, so there was something going on with 9.3. I think it's still worth mentioning.

                        @Rameshguru Please don't highjack other people threads with completely unrelated questions, open your own threads.

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

                        matthew.kuiashM 1 Reply Last reply
                        0
                        • SGaistS SGaist

                          @matthew-kuiash sure thing, I understand. Ok, so there was something going on with 9.3. I think it's still worth mentioning.

                          @Rameshguru Please don't highjack other people threads with completely unrelated questions, open your own threads.

                          matthew.kuiashM Offline
                          matthew.kuiashM Offline
                          matthew.kuiash
                          wrote on last edited by
                          #12

                          @SGaist Done https://bugreports.qt.io/browse/QTBUG-58014

                          Thanks for your help with this "heisenbug"

                          The legendary cellist Pablo Casals was asked why he continued to practice at age 90. "Because I think I'm making progress," he replied.

                          1 Reply Last reply
                          0
                          • R Offline
                            R Offline
                            Rameshguru
                            wrote on last edited by
                            #13

                            @SGaist how to use .dll any possibility is there

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

                              @matthew-kuiash You're welcome !

                              Happy hacking :)

                              @Rameshguru Again, please, open your own thread.

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

                              1 Reply Last reply
                              0
                              • R Offline
                                R Offline
                                Rameshguru
                                wrote on last edited by
                                #15

                                oh sorry ,i don't know

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

                                  Since it's C# related, go to General and Desktop. On the top left there's a big blue button call New Topic.

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

                                  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