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. iPad don't fire QEvent::TouchUpdate
Forum Updated to NodeBB v4.3 + New Features

iPad don't fire QEvent::TouchUpdate

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
11 Posts 4 Posters 1.6k Views 2 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.
  • P Offline
    P Offline
    peter-70
    wrote on last edited by peter-70
    #1

    I don't understand this! iPhone works very good, but iPad don't!
    I have the following code:

    bool ListControlVertical::event(QEvent* e)
    {
        auto event = e->type();
    
        if (event == QEvent::Gesture)
        {
            auto gesture = dynamic_cast<QGestureEvent*>(e);
            if (gesture)
            {
                this->HandleGesture(gesture);
            }
        }
    
        if (event == QEvent::TouchBegin)
        {
            auto touch = dynamic_cast<QTouchEvent*>(e);
            if (touch)
            {
                return this->HandleTouch(touch, event);
            }
        }
        else if (event == QEvent::TouchUpdate || event == QEvent::TouchEnd || event == QEvent::TouchCancel)
        {
            auto touch = dynamic_cast<QTouchEvent*>(e);
            if (touch)
            {
                this->HandleTouch(touch, event);
            }
        }
    
        return QListWidget::event(e);
    }
    

    This code works with iPhone like a charm! But when I test it with an iPad, the event QEvent::TouchUpdate is never fired.

    What could be reason for that wrong behavior?

    PS: On TouchBegin I return this->HandleTouch(touch, event);
    HandleTouch(touch, event) can return what it want, true or false. This has no effect, for the TouchUpdate event.

    I've returned the base class event for TouchBegin with e.accept() and e.ignore() as a test. But this have no effect too.

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

      Hi,

      You should also provide:

      • Qt version
      • iOS version
      • iPad model

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

      P 2 Replies Last reply
      0
      • SGaistS SGaist

        Hi,

        You should also provide:

        • Qt version
        • iOS version
        • iPad model
        P Offline
        P Offline
        peter-70
        wrote on last edited by
        #3

        @SGaist

        I can do that, but do you really think that you can help me with this information, and not without it?

        Just a moment, please...

        1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          You should also provide:

          • Qt version
          • iOS version
          • iPad model
          P Offline
          P Offline
          peter-70
          wrote on last edited by
          #4

          @SGaist

          Qt 5.11.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 8.1.0 (clang-802.0.42) (Apple)) on "cocoa"
          OS: macOS 10.14 [darwin version 18.2.0]

          Architecture: x86_64; features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2

          Qt Creator 4.6.2
          Based on Qt 5.11.1 (Clang 8.0 (Apple), 64 bit)
          From revision 1ddfb443b6
          Built on Jun 18 2018 11:52:18

          iPad Model: A1709

          PS: Honestly, do you really think, you can better (if any) locate this problem, when you see the informations?
          If I'm being totally honest, I think it is usually just as a formality, which some just like to repeat. Sorry for my forthrightness!

          jsulmJ 1 Reply Last reply
          0
          • P peter-70

            @SGaist

            Qt 5.11.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 8.1.0 (clang-802.0.42) (Apple)) on "cocoa"
            OS: macOS 10.14 [darwin version 18.2.0]

            Architecture: x86_64; features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2

            Qt Creator 4.6.2
            Based on Qt 5.11.1 (Clang 8.0 (Apple), 64 bit)
            From revision 1ddfb443b6
            Built on Jun 18 2018 11:52:18

            iPad Model: A1709

            PS: Honestly, do you really think, you can better (if any) locate this problem, when you see the informations?
            If I'm being totally honest, I think it is usually just as a formality, which some just like to repeat. Sorry for my forthrightness!

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @peter-70 It does make sense to ask for this information because many issues in older Qt versions are fixed in newer. Different iOS version (or what ever the platform is) can behave differently and so on. And it's not difficult to provide this information, or is it?

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            P 1 Reply Last reply
            1
            • jsulmJ jsulm

              @peter-70 It does make sense to ask for this information because many issues in older Qt versions are fixed in newer. Different iOS version (or what ever the platform is) can behave differently and so on. And it's not difficult to provide this information, or is it?

              P Offline
              P Offline
              peter-70
              wrote on last edited by
              #6

              @jsulm

              No, it is not difficult. But as I said, I'm honest: if I know a solution, I'll give it to you. And if it still does not work, or maybe some functions are not (anymore) there, or they are called differently, or have other parameters or types... then you can still ask for versions, etc.
              I think, immediately to ask about the versions, suggests something like this: "I have many solutions for you, which of them would like to have?"
              But in fact, it usually means something like this: "I do not have any solution, but it does not hurt to ask for the versions"
              It's not true when we are completely honest?

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

                It's based on years of answering questions and providing help where plenty of times, having had that information from the start would have gotten the answer faster rather than after 40 messages because all of a sudden the OP says that he in fact is currently developing using an outdated version of Qt.

                Because having a strange OpenGL issue with Qt 4.0 on a 2004 Windows XP machine running with a Radeon R500 or GeForce 6100 is really not the same as having a strange OpenGL issue with a 2019 machine using a Radeon VII or Titan X.

                Do I have an answer for every questions right from the start ? No
                Can the answer change based on the Qt version ? Yes
                Can the answer change based on the OS used ? Yes
                Can the answer change based on the target ? Yes
                Can I answer your question right now ? Sorry, no I can't.

                What does the information you provided help me with ?

                1. You don't run the latest official release of Qt, so you should start by checking Qt 5.12.1 which might contain the fix you need.
                2. You are using an iPad pro which hardware is different than an iPad2 for example which might have his own quirks since there's also the stylus support.
                3. Not knowing the iOS version, I can't tell whether it could be related to that version of iOS
                4. Not knowing the version of Xcode you are using I can't tell whether you are using the latest version of the SDK for development

                Number 4 answer will likely be Xcode 10 since you are running macOS 10.14 and it's the minimal version, so you should be safe from that side.

                So yes, the information you put when stating your problem is important. More people will be able to help you. And more basically, people will be interested in helping with your problem because you also have put in the time to explain it nicely, providing all the bits that could be useful to re-create the problem or the informations that you could gather.

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

                P 1 Reply Last reply
                4
                • P peter-70

                  @jsulm

                  No, it is not difficult. But as I said, I'm honest: if I know a solution, I'll give it to you. And if it still does not work, or maybe some functions are not (anymore) there, or they are called differently, or have other parameters or types... then you can still ask for versions, etc.
                  I think, immediately to ask about the versions, suggests something like this: "I have many solutions for you, which of them would like to have?"
                  But in fact, it usually means something like this: "I do not have any solution, but it does not hurt to ask for the versions"
                  It's not true when we are completely honest?

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @peter-70 If I'm honest then "it usually means something like this: "I do not have any solution, but it does not hurt to ask for the versions"" sounds aggressive and rude (to me). @SGaist spends a lot of his time here and helps for free and to insinuate that he asks you just for fun (or for what ever reason) is simply disrespectful.
                  My honest opinion...

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  P 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @peter-70 If I'm honest then "it usually means something like this: "I do not have any solution, but it does not hurt to ask for the versions"" sounds aggressive and rude (to me). @SGaist spends a lot of his time here and helps for free and to insinuate that he asks you just for fun (or for what ever reason) is simply disrespectful.
                    My honest opinion...

                    P Offline
                    P Offline
                    peter-70
                    wrote on last edited by
                    #9

                    @jsulm

                    The complexity of a question such asked, is often already in itself quite high.
                    Answering of questions is hardly resp. very difficult from a distance.
                    Making this problematic additionally harder, by dealing with versions etc. seems to me (at least in a first step) unnecessary, as she deepens the problem even further.
                    Instead, you can try to answer the question the way you can. If the versions should actually play a role, that can surely be clarified later.
                    I admit that I find such aggravating questions a little annoying. But I apologize for my emotionality!
                    I don't want to be impolite. Sorry and thanks!

                    1 Reply Last reply
                    1
                    • SGaistS SGaist

                      It's based on years of answering questions and providing help where plenty of times, having had that information from the start would have gotten the answer faster rather than after 40 messages because all of a sudden the OP says that he in fact is currently developing using an outdated version of Qt.

                      Because having a strange OpenGL issue with Qt 4.0 on a 2004 Windows XP machine running with a Radeon R500 or GeForce 6100 is really not the same as having a strange OpenGL issue with a 2019 machine using a Radeon VII or Titan X.

                      Do I have an answer for every questions right from the start ? No
                      Can the answer change based on the Qt version ? Yes
                      Can the answer change based on the OS used ? Yes
                      Can the answer change based on the target ? Yes
                      Can I answer your question right now ? Sorry, no I can't.

                      What does the information you provided help me with ?

                      1. You don't run the latest official release of Qt, so you should start by checking Qt 5.12.1 which might contain the fix you need.
                      2. You are using an iPad pro which hardware is different than an iPad2 for example which might have his own quirks since there's also the stylus support.
                      3. Not knowing the iOS version, I can't tell whether it could be related to that version of iOS
                      4. Not knowing the version of Xcode you are using I can't tell whether you are using the latest version of the SDK for development

                      Number 4 answer will likely be Xcode 10 since you are running macOS 10.14 and it's the minimal version, so you should be safe from that side.

                      So yes, the information you put when stating your problem is important. More people will be able to help you. And more basically, people will be interested in helping with your problem because you also have put in the time to explain it nicely, providing all the bits that could be useful to re-create the problem or the informations that you could gather.

                      P Offline
                      P Offline
                      peter-70
                      wrote on last edited by
                      #10

                      @SGaist
                      Please excuse my impatience and impulsiveness resp. resentment. Sorry, and thanks for trying help me!

                      1 Reply Last reply
                      0
                      • P Offline
                        P Offline
                        peter-70
                        wrote on last edited by peter-70
                        #11

                        @Gennyswiss
                        Yes, the problem still exists. Maybe someone knows what could be the reason resp. solution for it

                        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