Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. two cursors when run qt application
Qt 6.11 is out! See what's new in the release blog

two cursors when run qt application

Scheduled Pinned Locked Moved Unsolved General and Desktop
14 Posts 2 Posters 5.2k 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.
  • J Offline
    J Offline
    JiujiuTong
    wrote on last edited by JiujiuTong
    #1

    hi All:
    i meet a problem, my application works well on ubuntu(only one cursor), when it runs on raspberry, there are two cursors,one is black(seems for the desktop), and the other is white, only i move the white cursor to the button(with mouse), then press the button with finger, the application will response correctly, if not so, there is no response. however if i click the button with mouse , the application also works well, is there any good ideas? because it's unacceptable to move the cursos with the mouse everytime before finger press, as the screen is touch panel.

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

      Hi,

      Please add some basic information like what version of Qt you are using, what backend etc.

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

      J 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Please add some basic information like what version of Qt you are using, what backend etc.

        J Offline
        J Offline
        JiujiuTong
        wrote on last edited by JiujiuTong
        #3

        @SGaist
        thanks for you tips,
        update info:
        my qt version is Qt5.7.1, target host, raspberry pi3, QT 5.7.1 is cross complied on host.
        my application is simple, when click button, display a page and do something. then click the button on popup page and display another,
        current issue, with mouse everything is ok, but with finger it can't work.
        as the cursor can't move to the correct place , if i drag the cursor to the button, and click with finger, it will work.
        any ideas ? thank you !

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

          Did configure you application to get mouse event from the touch screen ?

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

          J 1 Reply Last reply
          0
          • SGaistS SGaist

            Did configure you application to get mouse event from the touch screen ?

            J Offline
            J Offline
            JiujiuTong
            wrote on last edited by JiujiuTong
            #5

            @SGaist
            thank you for your reminding , the application is enabled to get click event from mouse. should i set something special to get mouse event from the touch screen ?
            By the way, without set any special attribute and property(without setting Qt::WA_AcceptTouchEvents property , Qt::AA_SynthesizeTouchForUnhandledMouseEvents and Qt::AA_SynthesizeMouseForUnhandledTouchEvents ) , shouldn't the widget treat the touch event as mouse event?

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

              Usually tslib is used to get touchscreen event.

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

              J 1 Reply Last reply
              0
              • SGaistS SGaist

                Usually tslib is used to get touchscreen event.

                J Offline
                J Offline
                JiujiuTong
                wrote on last edited by JiujiuTong
                #7

                @SGaist
                i have installed tslib already,
                the application is developed with another touchscreen, and it works correctly, then i try to run the application with a bigger touchscreen, the issue happened,
                should i reinstall the tslib? my QT is crossed complied.
                current issue: the cursor can't move when the finger touches, but it will move if i use the mouse, so if i move the cursor to the right place, then press with finger, it will invoke the click event.

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

                  Did you reconfigure it to answer she has all data.

                  Calibration... Not configuration...

                  [edited: SGaist]

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

                  J 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    Did you reconfigure it to answer she has all data.

                    Calibration... Not configuration...

                    [edited: SGaist]

                    J Offline
                    J Offline
                    JiujiuTong
                    wrote on last edited by
                    #9

                    @SGaist
                    sorry, what's your meaning of reconfigure it to answer she has all data?

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

                      Sorry, there's been a glitch.

                      I meant, did you re-calibrate Tslib to match your new screen ?

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

                      J 1 Reply Last reply
                      0
                      • SGaistS SGaist

                        Sorry, there's been a glitch.

                        I meant, did you re-calibrate Tslib to match your new screen ?

                        J Offline
                        J Offline
                        JiujiuTong
                        wrote on last edited by JiujiuTong
                        #11

                        @SGaist
                        very sorry, it seems i haven't install the TSlib..., i will install it any sync it to my host, then reinstall my QT.
                        and from the refer of this info:
                        http://doc.qt.io/qt-5/embedded-linux.html
                        it seems there is no need to install TSlib, as my touchscreen support multi-touch, and it is new version.
                        anyway i will try the following steps:
                        install Qt5.7 on my raspberry pi 3 with cross compile method following the steps :http://wiki.qt.io/RaspberryPi2EGLFS.
                        install Tslib and calibrate it on rp3 directly before sync rpi to host .
                        when reinstall QT , should i take steps to enable(combine) Tslib into QT?

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

                          There's a plugin for tslib so yes you should check that it is built.

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

                          J 1 Reply Last reply
                          0
                          • SGaistS SGaist

                            There's a plugin for tslib so yes you should check that it is built.

                            J Offline
                            J Offline
                            JiujiuTong
                            wrote on last edited by
                            #13

                            @SGaist
                            well ,i drop it now, with another touchscreen , it also works well.
                            thank you !

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

                              What do you mean by "drop it now" ?

                              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